MATLAB: Generating a plot using shm function

hysteresisphysicsplot

Hi, I am trying to plot the SHM function online. I kind of plotted the first part of the curve but need further help with it.
x=0:0.1:10;
x1=10:0.1:0;
y=smf(x,[0,9]);
plot(x,y);
ylim([0 1.05]);
I want a curve which starts from (10, 1) and drops to (0,0.6) in the figure that I have attached. Can anyone help me with how to draw that curve? Thanks 🙂

Best Answer

Call "hold on" and then get a new y with different parameters. Then call plot() again with the new y.