Need help calculating beam moments

This is the code I have for calculating moment for 2 point loads. Now I have to make this calculate the moment for an arbitrary number of loads. So I will be given random point load information in 2 vectors (magnitude and distance from A). Will I have to change calculation strategy or is there a way to make this work?
% Create matrix MEI M/EI using nodes
% This calculates the moments at the nodes. This is used to create % matrix MEI, which is the Moment divided by E*I. This would be the "b" in % Ax=b
M=[];
for node=0:dx:L; if node>=0 && node<a moment=@(x) (RA*x); M(end+1)=moment(node); elseif node>=a && node<b moment=@(x) (RA*x)-(Pa*(x-a)); M(end+1)=moment(node); elseif node>=b && node<=L moment=@(x) (RA*x)-(Pa*(x-a))-(Pb*(x-b)); M(end+1)=moment(node); end end MEI=(1/(E*I))*M'

1 commentaire

KSSV
KSSV le 2 Mai 2016
Greg this is a subjected oriented question not MATLAB oriented. IT is tough to get your answer from the group. Are you following analytical solution for beam moments or numerical?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Parallel Computing dans Centre d'aide et File Exchange

Question posée :

le 2 Mai 2016

Commenté :

le 2 Mai 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by