access to element of variable in ode

function V=wffun(t,i)
[t,i] = ode15s(@wffun,tspan,i0)
ode return Matrix with length of k. how can i access element of t and i while ode is runing? in function wffun i use t(k-1) and t(k)

답변 (1개)

Steven Lord
Steven Lord 2018년 9월 17일

0 개 추천

If the differential equation you're solving includes a reference to the value of a component of the solution at an earlier time, you don't have an ordinary differential equation. Use a delay differential equation solver instead.

댓글 수: 1

siroos jalilyan
siroos jalilyan 2018년 9월 17일
No just i need value of "t" in previous step and current step in function wffun if use "t" just return one value .

댓글을 달려면 로그인하십시오.

카테고리

질문:

2018년 9월 16일

댓글:

2018년 9월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by