%plot stuff
%i=1
x(1)=-5
n=300
for i=1:n+1
y(1,i)=cosh(3*x(i)-pi/2);
y(2,i)=sinh(5*x(i)+pi/8);
x(i+1)=x(i)+30/n;
%i=i+1;
end
plot(x(1:n+1),y(1,:),'kd',x(1:n+1),y(2,:),'rh')
I have no idea what I'm doing. I got help writing a Matlab program that plots the cosh(3x-(pi/2)) and sinh(5x+(pi/8)) on a single plot from x=-5 to 25 using a script file. But could you please explain to me what each line of this script file represents/does and how I actually get the graph to come up in Matlab? I especially don't understand what the i's, n's, and colons are for. Please see attachment.
Thanks.