MATLAB: Doubt regarding ode45 plotting

ode45plotting

Dear Friends,
I need to plot ABS(B(1)) Vs delk in the following program code. How can i include delk variable in the ode45 function calling line.

Best Answer

Please make more clear what you try to plot.
As far as I can see, delk is a model parameter (scalar).
B is a vector (solution at different times).
You can't plot a vector over a scalar.
I guess you want to plot different solutions B over time for different values of delk.
For this puropse, you have to generate different solutions B (e.g. in a loop in which you call ODE45 several times for changing values of delk).
Best wishes
Torsten.
Related Question