Moment diagram code error when using .^2
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
So i started making shear and moment diagram of uniform distributed load. Watched Youtube and followed some steps however i ended up with problems on moment. Please help
formula on shear -- working
V=Ra*(x>0)-UDL*(x-0).*(x>0)+UDL*(x-4).*(x>4)-cl1*(x>4)-UDL*(x-4).*(x>4)+UDL*(x-12).*(x>12)+Rc*(x>12)-UDL*(x-12).*(x>12)+UDL*(x-18).*(x>18)-cl2*(x==18);
formula on moment --not working (still not complete yet coz im still working on it.
M=-(UDL/2)*(x-0).^2*(x>0) + (UDL/2)*(x-4).^2*(x>4);
1 Commento
Jan
il 8 Dic 2022
How can we help you? The information that you have seen something on YouTube and that you want to implement a "formula on moment" is not sufficient to explain, what "not working" means.
Risposte (1)
John D'Errico
il 8 Dic 2022
Modificato: John D'Errico
il 8 Dic 2022
You SAID that you understand the need for the .* and .^ operators. Then we see this:
M=-(UDL/2)*(x-0).^2*(x>0) + (UDL/2)*(x-4).^2*(x>4);
_ _
And it seems you forgot what you said? The problem is not in the use of .^ but in the use of a different incorrect operator.
What else can I say? :)
0 Commenti
Vedere anche
Categorie
Scopri di più su Performance and Memory in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!