Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
How to Create an Anonymous Function?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?
0 commentaires
Réponses (1)
Stephan
le 18 Oct 2020
Modifié(e) : Stephan
le 18 Oct 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 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!