Trying to plot multiple values
Show older comments
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 Comment
Walter Roberson
on 9 Apr 2019
Duplicate question :(
Answers (1)
Adam Danz
on 9 Apr 2019
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 -------------------------------------------- ^
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!