Need help calculating beam moments

3 views (last 30 days)
Greg
Greg on 2 May 2016
Commented: KSSV on 2 May 2016
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 Comment
KSSV
KSSV on 2 May 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?

Sign in to comment.

Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!