Home Matlab trouble with display
Reply: 0

Matlab trouble with display

user938
1#
user938 Published in July 21, 2018, 1:48 pm

I have a problem with matlab does not want me to display the results of this script says that I have a syntax error in the dispie but how to dispa correctly save because I tried in different ways and as it is saved now I got in the formula of the task.

clear; clc;
a=1; EA=2*10^5; EI=2*10^6; M=30;
A=[EA/a 0 0;
    0 12*EI/a^3 -6*EI/a^2;
    0 -6*EI/a^2  4*ei/3*a;]
P=[0;0;M];
U=A\P;
x=0:a/10:a;
u4=U(1);u5=U(2);u6=U(3)
uh=u4*x;
uv= u5*((3*x^2)/a^2 - (2*x^3)/a^3 + u6 - ((-(x)^2/a)+(x^3)/a^2)
disp([x',uh',uv']);
plot(x+uh,uv);

the same error is when i try to do that like this

clear; clc;
a=1; EA=2*10^5; EI=2*10^6; M=30;
A=[EA/a 0 0;
    0 12*EI/a.^3 -6*EI/a.^2;
    0 -6*EI/a.^2  4*EI/3*a;]
P=[0;0;M];
U=A\P;
x=0:a/10:a;
u4=U(1);u5=U(2);u6=U(3);
uh=u4*x;
uv= u5*((3*x^2)/a.^2 - (2*x^3)/a.^3 + u6 - ((-(x)^2/a)+(x^3)/a.^2);
disp([x',uh',uv']);
plot(x+uh,uv);
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.311607 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO