%clc
%close all
%clear
%Steel
n = 0.22;r = 0.9;for a = -1:1; nr1 = (1+r*(1-a))*(1-(2*r*a/1+r)+a^2); nr2 = ((1+r)*a-r)*(1-(2*r*a/1+r)+a^2); dr = (1+r)*(1+a)*(1-((1+4*r+2*r^2)*a/(1+r)^2)+a^2); e1 = (nr1/dr)*n; e2 = (nr2/dr)*n;end;plot(e2,e1);
MATLAB: I want to save all the values of e1 and e2 and then I want to plot them
save variables from for loop in array
Best Answer