matlab矩阵帮助

来源:百度知道 编辑:UC知道 时间:2024/06/13 03:00:20
L = 1046.95; % L is the total distance for the beam.
% The unit for L is mm

A = 1031.95; % A = l3 is the distance form the diagram.
B = 866.85; % B = l2 is the distance form the diagram.
D = 581.05; % D = l1 is the distance form the diagram.
% The unit for l1,l2 & l3 are mm

E = 209; % E is modulus of elasticity, elliptic integral of the second kind.
% The unit for E is GPa

I = 91934.0; % I is moment of inertia of a plane area. If w choose the constants diameter for d1=6mm and d2=37mm
% The unit for I is mm.
N = input('please enter the value for N=') % N is finite elements
h = L/N % h is width
c = input('Please enter the value for i=');
if (0<=c)&(c<=N)
else
error('The i over the range.')
end
for i=0:c

x=i*h; % x is measure downwards from the fixture at the top.

Ma = 1; % bending moment when x = l3. The unit for Ma is Nm.

C

给你改了下:
L = 1046.95; % L is the total distance for the beam.
% The unit for L is mm

A = 1031.95; % A = l3 is the distance form the diagram.
B = 866.85; % B = l2 is the distance form the diagram.
D = 581.05; % D = l1 is the distance form the diagram.
% The unit for l1,l2 & l3 are mm

E = 209; % E is modulus of elasticity, elliptic integral of the second kind.
% The unit for E is GPa

I = 91934.0; % I is moment of inertia of a plane area. If w choose the constants diameter for d1=6mm and d2=37mm
% The unit for I is mm.
N = input('please enter the value for N=') % N is finite elements
h = L/N % h is width
c = input('Please enter the value for i=');
if (0<=c)&(c<=N)
else
error('The i over the range.')
end
C=[];
for i=0:c

x=i*h; % x is measure downwards from the fixture at the top.

Ma = 1; % bending moment when x = l3. The unit