フィルターのクリア

Anonymous function hyperbolic function code

2 ビュー (過去 30 日間)
Salar
Salar 2012 年 9 月 24 日
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.

採用された回答

Matt Fig
Matt Fig 2012 年 9 月 24 日
編集済み: Matt Fig 2012 年 9 月 24 日
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 件のコメント
Walter Roberson
Walter Roberson 2012 年 9 月 24 日
plot(x, snh(x), x, csh(x))
Salar
Salar 2012 年 9 月 25 日
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!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Objects についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by