Problem using ode23tb (Error: Index exceeds the number of array elements)
古いコメントを表示
Hello
I am trying to use the function ode23tb to solve the system of ODEs described bellow. However, I am having trouble, because the function returns an error, namely "Index exceeds the number of array elements (1)". I am not sure which variable is causing the problem. I am indexing the argument y within f, but, as far as I can understand, the same thing is done in the vdp1000 example in the ode23tb documentation and it causes no trouble. Thanks in advance for your help.
VDD = 10;
Ld = 120e-6;
Cg = 50e-12;
Cb = 40e-12;
RS = 50;
RL = 6.6;
iD = @(vG,vD) 10*(1/2.*(vG-3)+1/20.*log(2*cosh(10*(vG-3)))).*(1+0.003.*vD).*tanh(vD);
f = @(y,vs)[
1/Cg*((vs-y(1))/RS-iD(y(1),y(2))-y(3)-y(2)/RL);
1/Cg*(vs-y(1))/RS-(Cb+Cg)/(Cb*Cg)*(iD(y(1),y(2))+y(3)+y(2)/RL);
(y(2)-VDD)/Ld;
];
ff = @(y,t) f(y,3+20*sin(2*pi*10e6*t));
[t,y] = ode23tb(ff,[0 pi/(10e6*pi)],[3; 10; 10/6.6]);
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!