Effacer les filtres
Effacer les filtres

Anonymous function hyperbolic function code

2 vues (au cours des 30 derniers jours)
Salar
Salar le 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.

Réponse acceptée

Matt Fig
Matt Fig le 24 Sep 2012
Modifié(e) : Matt Fig le 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 commentaires
Walter Roberson
Walter Roberson le 24 Sep 2012
plot(x, snh(x), x, csh(x))
Salar
Salar le 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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Objects dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by