Azzera filtri
Azzera filtri

can you iterate a change in odefun for ode45?

1 visualizzazione (ultimi 30 giorni)
Martin
Martin il 11 Giu 2013
Hi, so I am wanting to plot how a solution to a set of coupled odes change as the function changes by some iterated amount. I have something like this so far:
for ip = 1:length(phi)
for it = 1:n
phii = phi(ip);
tt = timerangei(it); %defining the integration time start.
%ttt = timeranger(it);
[t,x] = ode45('Et_Field_ODE45_w2w_phiscan',tt:0.001*1e-15:tf,[0,0],phii); %solving the coupled odes.
allx{ip,it,1} = x(:,1); %assigning the traj to cell
allv{ip,it,1} = x(:,2); %assigning the velo to cell
allt{ip,it,1} = t; %assigning the time to cell
end
end
So as you can see I am changing the time between tt and tf, but also wanting do that for an iterative change of the phase, phi. Is this something you can do or am I looking at a manual job? At the moment, I thought I'd be able to insert the value of phi, but the way ode45 works it reads phii as an option...
Thanks

Risposte (0)

Categorie

Scopri di più su Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by