Can someone explain where the values of the column vector z are coming from in this function?
1 view (last 30 days)
Show older comments
This function is an ode45 solving a set of data from a separate script that calls up this function. However, I don't understand what the values z(1), z(2), etc. are and where they are coming from as they aren't part of the main script and only feature here. I tried calling up z in the command window but to no avail.
function zprime=vdpns_rhs(t,z)
global par
zprime=[z(2)
-par(1)*(z(1)^2-1)*z(2)-z(1)-par(1)*par(2)*(z(1)-z(3))
z(4)
(-par(4)*z(4)-par(6)/par(1)*z(3)-par(5)/par(1)*z(3)^3-par(2)*(z(3)-z(1)))/par(3) ] ;
0 Comments
Accepted Answer
Star Strider
on 16 Apr 2014
The variable z is an argument to vdpns_rhs and is local to it, so unless you display it from within vdpns_rhs, it’s not going to appear.
It is the dependent variable and function of t here. See the documentation on odefun in ode45 for details.
0 Comments
More Answers (0)
See Also
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!