From: Angela Brands on
hello,

Can anyone explain how I can plot

y=((3/4)*cosh(sqrt(2)*x)+(1/(sqrt(2)))*sinh(sqrt(2)*x))*exp(-2*x)

to get a good image of y....

I really hope anyone can help me...

Kind regards
A
From: Ben on
x=1:1;100;
y=((3/4)*cosh(sqrt(2)*x)+(1/(sqrt(2)))*sinh(sqrt(2)*x))*exp(-2*x);
figure;
plot(x,y)

The only problem is, this is just one point. Plotting it is kind of boring.
From: Steven Lord on

"Angela Brands" <angela_christina(a)hotmail.com> wrote in message
news:hljdbr$mng$1(a)fred.mathworks.com...
> hello,
>
> Can anyone explain how I can plot
>
> y=((3/4)*cosh(sqrt(2)*x)+(1/(sqrt(2)))*sinh(sqrt(2)*x))*exp(-2*x)
>
> to get a good image of y....
>
> I really hope anyone can help me...

Change at least the last instance of * in the expression to .* (since you
want to perform element-by-element multiplication of the sinh and exp terms,
not matrix multiplication of those terms), create a vector of x values,
evaluate the expression to generate a vector of y values, then PLOT.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ