ode - Matlab - Odeset - Odeplot -


i use odeplot stepwise result instead of plotting result afterwards. i've tried write can't work appreciate help.

%parameters  s = 1;   q = 1;   w = 0.1610;  y0 = [30 1 30]; % initial values  tspan = [0 10]; % time 0<t<10  plot=odeset('outputfcn','odeplot');  [t, y] = ode45(@(t,y) concentration(t, y, s, q, w), plot, tspan, y0); 

you need specify output function via ode options argument:

options = odeset('outputfcn', @odeplot); [t, y] = ode45(@(t,y)concentration(t, y, s, q, w), tspan, y0, options); 

of course can make own custom output function. type edit odeplot see required (much simpler functions possible). check out odephas2 , odephas3.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -