Can someone explain where the values of the column vector z are coming from in this function?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jake
el 16 de Abr. de 2014
Respondida: Star Strider
el 16 de Abr. de 2014
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 comentarios
Respuesta aceptada
Star Strider
el 16 de Abr. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!