How simplify my code to where I can write t=[0 .2 .5 1 2] instead of writing them individually as t1,t2 etc… And possibly plot it as just plot(x,y) to where I get the same graph. Below is the code I am referring to.
cleart0=0t1=.2t2=.5t3=1t4=2x=-6:12/100:6y0=-2*sinh(x)./(cosh(x)-exp(-t0));y1=-2*sinh(x)./(cosh(x)-exp(-t1));y2=-2*sinh(x)./(cosh(x)-exp(-t2));y3=-2*sinh(x)./(cosh(x)-exp(-t3));y4=-2*sinh(x)./(cosh(x)-exp(-t4));plot(x,y0,'--')hold onplot(x,y1)plot(x,y2) plot(x,y3)plot(x,y4)axis([-6 6 -4 4])
Best Answer