MATLAB: I was writing a equation but this always have an error and i cant run it

equationMATLAB

y = ((W*S)/(T*T)).*((cosh((a).*(L/2-x)))./(cosh(a*L/2)-1))+(W*x).*(L-x)/(2*T);
T= 1000;
L=10;
W=100;
S=100000; %% this is tha value of E*I
a=0.316;
x=0:0.1:10;
plot(y,x)

Best Answer

You should first define the constants and then type the formula.
T= 1000;
L=10;
W=100;
S=100000; %% this is tha value of E*I
a=0.316;
x=0:0.1:10;
y = ((W*S)/(T*T)).*((cosh((a).*(L/2-x)))./(cosh(a*L/2)-1))+(W*x).*(L-x)/(2*T);
plot(x,y)