Filter löschen
Filter löschen

Anonymous function hyperbolic function code

2 Ansichten (letzte 30 Tage)
Salar
Salar am 24 Sep. 2012
sinh(x) =(exp^(x)-exp(-x))/2
cosh(x) =(exp(x)+exp(-x))/2
anonymous functions mysinh(x) and mycosh(x)
which perform the calculations above. Call these functions and plot both mysinh and
mycosh from −2 ≤ x ≤ 2 using 1/100 increments on a single figure. Label, add a
legend, and title it ”Anonymous Output”.
Please help to write this function, Thanks I know about @, but I get errors all the time, so i feel lost here.

Akzeptierte Antwort

Matt Fig
Matt Fig am 24 Sep. 2012
Bearbeitet: Matt Fig am 24 Sep. 2012
When asking for help, please be as specific as possible. You get errors? WHAT ERRORS?
snh = @(x) (exp(x)-exp(-x))/2
snh(1:5)
This sounds like homework. Please show all of the work you have done so far and describe where you are stuck.
  7 Kommentare
Walter Roberson
Walter Roberson am 24 Sep. 2012
plot(x, snh(x), x, csh(x))
Salar
Salar am 25 Sep. 2012
Thank you very much, I know I might be asking stupid questions, but this is my last resource, and so far I learned lot from you, Thank you again!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by