フィルターのクリア

Solving a dde23 problem

1 回表示 (過去 30 日間)
Deepayan Bhadra
Deepayan Bhadra 2017 年 12 月 19 日
コメント済み: Torsten 2017 年 12 月 19 日
This seems simple enough: xdot = -Lx(t-0.1) L is a constant integer 10x10 matrix and x is 10x1 vector.
I am using this code snippet:
x0 = randn(10,1);
sol = dde23(@ddefun,[0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1],x0,[0 5]);
I'm defining ddefun as
function v = ddefun(t,x,Z)
D = diag([2 3 4 4 4 4 4 4 3 2]);
L = D-A; %A is a fixed 10x10 matrix (not written here since it's long)%
v = -L*Z;
end
This gives an error "Not enough input arguments. Error in ddefun (line 5) v = -L*Z"
How do I circumvent this issue and solve for x?
Thanks a lot.
  3 件のコメント
Deepayan Bhadra
Deepayan Bhadra 2017 年 12 月 19 日
Z is 10x1 right? I mean, Z reflects x(t-0.1), that is from x1(t-0.1 to x10(t-0.1). I'm not yet well versed with the DDE syntax. Thoughts?
Torsten
Torsten 2017 年 12 月 19 日
Just check it in "ddefun":
[m,n] = size(Z)
Best wishes
Torsten.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by