Need a column vector from ode45, but I keep getting a struct
Show older comments
For some homework I'm trying to use ODE45 using a third-order chemical reaction equation.
k3 = 0.1;
tspan = 0:100;
C0 = 0.6;
dCadt = @(t,Ca) (-k3.*Ca.^3);
ode_solver = ode45(dCadt, tspan, C0); % ODE solver used in task 3, using the formula from Q1
this is the code I'm using, but I keep getting a struct and I can't extract any values from that. I would like to get a column vector, so I can calculate errors between different ODE solvers. Can anyone help me with this?
1 Comment
Casper Vermeulen
on 5 Jan 2022
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!