How to Create an Anonymous Function?
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?

Antworten (1)
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 Kommentare
William Tran
am 18 Okt. 2020
Stephan
am 18 Okt. 2020
Did you notice that you can accept and/or vote for useful answers?
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!