Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to Create an Anonymous Function?

조회 수: 1 (최근 30일)
William Tran
William Tran 2020년 10월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
How do I enter ((-e^t) -1) / (1-e^t)) as an anonymous function?

답변 (1개)

Stephan
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
William Tran
William Tran 2020년 10월 18일
Yea, it was the closing bracket; thankyou
Stephan
Stephan 2020년 10월 18일
Did you notice that you can accept and/or vote for useful answers?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by