Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to Create an Anonymous Function?

1 visualización (últimos 30 días)
William Tran
William Tran el 18 de Oct. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?

Respuestas (1)

Stephan
Stephan el 18 de Oct. de 2020
Editada: Stephan el 18 de Oct. de 2020
Try to write it in one line - i guess you use an older release of Matlab, that does not support the semicolon operator in a second line - also a closing bracket ist missing:
x_explicit = @(t,x) ((-exp(t)-1)./(1-exp(t)));
btw: your function does not use x - why is it input argument?
  2 comentarios
William Tran
William Tran el 18 de Oct. de 2020
Yea, it was the closing bracket; thankyou
Stephan
Stephan el 18 de Oct. de 2020
Did you notice that you can accept and/or vote for useful answers?

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by