Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to Create an Anonymous Function?
1 次查看(过去 30 天)
显示 更早的评论
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?

0 个评论
回答(1 个)
Stephan
2020-10-18
编辑:Stephan
2020-10-18
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 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!