I wanted to ask this program:
How many elements are there? for esample 5
If there are five elements creates a 5 x n.elements matrix and enter the data.
A1 D1 xg1 yg1 zg1
A2 D2 xg2 yg2 zg2
A3 D3 xg3 yg3 zg3
A4 D4 xg4 yg4 zg4
A5 D5 xg5 yg5 zg5
When I ask the program:
Calculate the mass of each element:
A1 * D1 = M1
A2 * D2 = M2
A3 * A3 = M3
A4 * D4 = M4
A5 * D5 = M5
I ask the program calculate the total mass
M (tot) = M1 + M2 + M3 + M4 + M5
After I asked him: Now compute the centroid
Xg=[somm(xg^i* M^i) ] / M(total)= xg1*m1+xg2*m2+xg3*m3+xg4*m4+xg5*m5 / M(tot)
Yg=[somm(yg^i* M^i) ] / M(total)= yg1*m1+yg2*m2+yg3*m3+yg4*m4+yg5*m5 / M(tot)
Zg=[somm(zg^i* M^i) ] / M(total)= zg1*m1+zg2*m2+zg3*m3+zg4*m4+zg5*m5 / M(tot)
()
Prgm
InputStr "n. di elementi",aux
expr(aux)->aux
newMat(aux,5)->maux
I have this matrix aux * 5 and call it maux ok? In the first column I want to insert the values of A and save them in a list , how do?
For i,1,aux
InputStr "Enter A"&string(i),aux1
expr(aux1)->aux1
aux1->maux[i,1]
EndFor
EndPrgm
Barycentre
14 messages
• Page 2 sur 2 • 1, 2
Re: Barycentre
Dernière édition par marcoz le 15 Fév 2014, 16:33, édité 1 fois.
-
marcoz
Niveau 3: MH (Membre Habitué)- Messages: 11
- Inscription: 11 Déc 2011, 14:58
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: Ingegneria
Re: Barycentre
Suppose that I insert the values
A1 = 7
A2 = 5
A3 = 2
A4 = 11
A5 = 52
At the end of the for loop I would like to save these values in a list which I call for example corm
If I go home and I type in the corm I'd like to read (7,5,2,11,52)
A1 = 7
A2 = 5
A3 = 2
A4 = 11
A5 = 52
At the end of the for loop I would like to save these values in a list which I call for example corm
If I go home and I type in the corm I'd like to read (7,5,2,11,52)
-
marcoz
Niveau 3: MH (Membre Habitué)- Messages: 11
- Inscription: 11 Déc 2011, 14:58
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: Ingegneria
Re: Barycentre
Hi,
I am very much confused about your posts, as most of them are composed of questions you answered yourself ...
So, if you have a question : Ask it.
All your previous ones already had an answer.
By the way, I see everywhere "Input" and "InputStr", I guess you all meant Request / RequestStr.
I am very much confused about your posts, as most of them are composed of questions you answered yourself ...
So, if you have a question : Ask it.
All your previous ones already had an answer.
By the way, I see everywhere "Input" and "InputStr", I guess you all meant Request / RequestStr.
-
LevakAdmin
Niveau 14: CI (Calculateur de l'Infini)- Messages: 6414
- Images: 22
- Inscription: 27 Nov 2008, 00:00
- Localisation: 0x1AACC355
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: BAC+5: Epita (ING3)
Re: Barycentre
I see to be clearer. I have attached an exercise and would like to make a program to fix it
Vous n’avez pas les permissions nécessaires pour voir les fichiers joints à ce message.
-
marcoz
Niveau 3: MH (Membre Habitué)- Messages: 11
- Inscription: 11 Déc 2011, 14:58
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: Ingegneria
14 messages
• Page 2 sur 2 • 1, 2
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 4 invités