MATLAB: Generates for loop for Stress and Strain

mechanics

I am given a problem where I have to generate data point to plot. This values will show how a biomaterial is reacting.
Here are the values given to me.
Question : Model the elastic-plastic behavior of the sample polymer given above. Create a Matlab
program to model the above equations to plot a stress-strain curve.
This what I done so far yet my for loop is not working; thus I can generate the nessary data points to plot. Please help I am not very verse in Matlab.
E1=4.0; %4 is in GPa
E2=5.0; %5 is in GPa
Mu= 1.2*10^5; %this measures creep
stressO = 800*10^6; %this is initial stress
for i=0:stressO
data.less(i)=i/(E1); % Yielding when applies stress is less than initial stress

end
for i=stressO:(1.5*10^9)
data.great(i)=(i/(E1))+((i-stressO)/E2); % Yielding when applies stress is less than initial stress
end
subplot (2,1,1)
plot (data.less);
subplot (2,1,2)
plot (data.great);

Best Answer

Here is the problem
The solution:
sp = stress0.plus10:1500
for i = 1:length(sp);
strain.stressplus10(i)=(sp(i)/E1)+((sp(i)-stress0.plus10)/E2);
end