# Matlab plotting cosh

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.

Â© BrainMass Inc. brainmass.com December 24, 2021, 4:47 pm ad1c9bdddfhttps://brainmass.com/computer-science/matlab/matlab-plotting-cosh-sinh-single-plot-script-7744

#### Solution Preview

Here is the description of the meaning of different symbols used in script file:

% => comment out the line

x(1) = - 5 => first point of x starts from -5

n =300 => the value assigned to variable n

for i =1:n+1 => loop for i =1 to n+1

y(1,i) => first y function's ...

#### Solution Summary

Matlab plotting cosh is embedded. The Matlab plotting cosh and sinh on a single plot using a script are examined.