Explore BrainMass

# Matlab plotting cosh

Not what you're looking for? Search our solutions OR ask your own Custom question.

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

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.

https://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.

\$2.49