Matlab ode15s change parameter value at specific time during solution
问题 I'm trying to change the value of my variable Pin at specific points in time during the ode15s solution, in order to evaluate the dynamic response. But I get the error: Error using odearguments (line 83) The last entry in tspan must be different from the first entry. I believe the error is somewhere here: t_start=0; t=t_start; y=cond; while idx_seg< length(t_seg) idx_seg=idx_seg+1; t_end=t_seg(idx_seg); [t_sol,y_sol]=ode15s(@(t,y)f1_v1,[t_start, t_end],y(end,:)); t = [t; t_sol(2 : end)]; y =