Hello, I'm trying to plot multiple values on one graph. For the attached code, I can get the plots for Ex to show up, but not for Gxy. Any help would be appreciated.

답변 (1개)

Adam Danz
Adam Danz 2019년 4월 9일

0 개 추천

That's because your code is breaking due to error at the following line of code on the first iteration of the second for-loop. You should have seen red warning text in your command window pointing to this line of code.
G_Inverse = 2*(2/E11+2/E22+4*v12/E11-1/G12)*(sind(theta)^2)*(cosd(theta)^2)+1/G12((cosd(theta)^4)+(sind(theta)^4));
% P R O B L E M I S H E R E ----------------------------------------------^
Instead, if you're intention is to multiply,
G_Inverse = 2*(2/E11+2/E22+4*v12/E11-1/G12)*(sind(theta)^2)*(cosd(theta)^2)+1/G12 * ((cosd(theta)^4)+(sind(theta)^4));
% S O L U T I O N I S H E R E -------------------------------------------- ^

카테고리

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

태그

질문:

2019년 4월 8일

댓글:

2019년 4월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by