Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How to Create an Anonymous Function?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?

0 Commenti
Risposte (1)
Stephan
il 18 Ott 2020
Modificato: Stephan
il 18 Ott 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 Commenti
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!