Explore BrainMass

Matlab plotting cosh

This content was STOLEN 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.


© BrainMass Inc. brainmass.com October 16, 2018, 3:54 pm ad1c9bdddf


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.

Similar Posting

Matlab work: linear time-invariant continuous system and Laplace transform

Please refer to attached. Please submit Matlab code along with plots and anwsers. Thanks.

A linear time-invariant continuous-time system has the impulse response below:
h(t) =[cos 2t + 4 sin 2t]u(t)

(a) Determine the transfer function H(s) of the system.
(b) Plot the system impulse response using MATLAB.
(c) The input, x(t) is defined as x(t) = 5/7e^-t - 12/7e^-8t. Find X(s).
(d) Compute the output response Y(s).
(e) Compute and plot (using Matlab) y(t).

View Full Posting Details