%if true
% code
%end
x = linspace(-0.02,0.02);
y = -(2.56*10^10)*x;
plot(x,y)
title('\sigma_{xx}')
r=linspace(-0.02,0.02);
s=(2.56*10^6)-(6.4*10^9)*(r^2);
plot(r,s)
title('\sigma_{xy}')
I want to plot these two graphs but for the second graph, there is error for some reason

 채택된 답변

KSSV
KSSV 2020년 11월 9일

0 개 추천

Read about element by element operations.
x = linspace(-0.02,0.02);
y = -(2.56*10^10)*x;
plot(x,y)
title('\sigma_{xx}')
r=linspace(-0.02,0.02);
s=(2.56*10^6)-(6.4*10^9)*(r.^2); % change here use .^
plot(r,s)
title('\sigma_{xy}')

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2020년 11월 9일

답변:

2020년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by