[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)
Sign in to comment.
Direct link to this answer:
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.
Direct link to this comment:
just i need value of "t" in previous step and current step
in function wffun if use "t" just return one value .
Sign in to answer this question.
Opportunities for recent engineering grads.
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office