for E1=1:73
W=15;
L=1.3;
w=0.25;
h=0.075;
I=(w*h^3)/12;
Deflection5 = (W.*L.^3)/(3.*E1.*I)
plot(E1,Deflection5)
end
Guys why it does not appear what is the problem? I tried to make plot of the E1 values and Deflection while both values changing.

 채택된 답변

Torsten
Torsten 2022년 4월 11일

0 개 추천

E1=1:73
W=15;
L=1.3;
w=0.25;
h=0.075;
I=(w*h^3)/12;
Deflection5 = (W.*L.^3)./(3.*E1.*I)
plot(E1,Deflection5)

댓글 수: 6

Ömer Fatih Özdemir
Ömer Fatih Özdemir 2022년 4월 11일
Is it possible to make it with for loop?
Torsten
Torsten 2022년 4월 11일
E1 = 1:73;
W=15;
L=1.3;
w=0.25;
h=0.075;
I=(w*h^3)/12;
for i=1:numel(E1)
Deflection5(i) = (W*L^3)/(3*E1(i)*I)
end
plot(E1,Deflection5)
Ömer Fatih Özdemir
Ömer Fatih Özdemir 2022년 4월 11일
Thank you! and can you help me for legend command if you know?
Torsten
Torsten 2022년 4월 11일
편집: Torsten 2022년 4월 11일
Ömer Fatih Özdemir
Ömer Fatih Özdemir 2022년 4월 11일
편집: Ömer Fatih Özdemir 2022년 4월 11일
for example, how to use two plot in legend?
L1=linspace(0.001,1.3);
Deflection1 = (W.*L1.^3)/(3.*E.*I);
plot(L1,Deflection1)
this and
Deflection5
Torsten
Torsten 2022년 4월 12일
편집: Torsten 2022년 4월 12일
plot(L1,Deflection1)
hold on
plot(L1,Deflection5)

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Davide Masiello
Davide Masiello 2022년 4월 11일
편집: Davide Masiello 2022년 4월 11일

0 개 추천

No need for a for loop
E1=1:73;
W=15;
L=1.3;
w=0.25;
h=0.075;
I=(w*h^3)/12;
Deflection5 = (W.*L.^3)./(3.*E1.*I);
plot(E1,Deflection5)

카테고리

도움말 센터File Exchange에서 Animation에 대해 자세히 알아보기

태그

질문:

2022년 4월 11일

편집:

2022년 4월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by