Borrar filtros
Borrar filtros

Anonymous function hyperbolic function code

2 visualizaciones (últimos 30 días)
Salar
Salar el 24 de Sept. de 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.

Respuesta aceptada

Matt Fig
Matt Fig el 24 de Sept. de 2012
Editada: Matt Fig el 24 de Sept. de 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 comentarios
Walter Roberson
Walter Roberson el 24 de Sept. de 2012
plot(x, snh(x), x, csh(x))
Salar
Salar el 25 de Sept. de 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!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Objects en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by