Can someone explain where the values of the column vector z are coming from in this function?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Star Strider
2014 年 4 月 16 日
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!