Operation Order and Matrix Agreement Not working
이전 댓글 표시
This code will not run with the error "inner matrix dimensions must agree".I am not sure is the fomulas are written out completely. This utilizes the Deflection equations found here (It is a pdf of multiple deflection equations):
I used the formulas on: 2, 3, 7, 8
I is the moment of Inertia L is the actual Length of the beam b is the width of the beam x is the points to test on a beam // this is saved a a vector 0 is omega which is the Force(Magnitude) divided by the Length of the beam
Please help if you can understand this or know what is wrong.
I = z.Inertia;
L = z.Length;
b = z.Width;
x = linspace(0,z.Length);
o = z.Magnitude/z.Length; % Magnitude is them same as the force
if z.Load == 1
if z.Support == 1
Beam.y1 = (F*x.^2/6*E*I)*(3*a-x); % 0<x<a
Beam.y2 = (F*a^2/6*E*I)*(3*x-a); % a<x<L
else % x.Support == 2
Beam.y1 = (F*b*x/6*L*E*I)*(L^2-x.^2-b^2); % 0<x<a
Beam.y2 = (F*b/6*E*L*I)*((L/b)*(x-a)^3+(L^2-b^2)*x-x.^3); % a<x<L
end
else % x.Load == 2
if z.Support == 1
Beam.y1 = (o*x.^2/24*E*I)*(x.^2+6*L^2-4*L*x);
else % x.Support == 2
Beam.y1 = (o*x.^2/24*E*I)*((L^3-2*L*x.^2)+x.^3);
end
end
채택된 답변
추가 답변 (1개)
카테고리
도움말 센터 및 File Exchange에서 Control System Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!