How to? - Complex numbers
2 ビュー (過去 30 日間)
古いコメントを表示
dVdotdt= @(-(Whalf-1i.*w).*V + alfa.*Uin);
(Whalf-1i.*w) part is complex.
When I put the above in my equation I get 'Warning: Imaginary parts of complex X and/or Y arguments ignored'
I am not sure if my syntax is correct to be honest as my answer should be exponential but it is a straight line; also does ode handle complex well- maybe thats the reason my curve is flawed.
1 件のコメント
Adam
2019 年 2 月 11 日
編集済み: Adam
2019 年 2 月 11 日
You defined a function of two inputs, t and y yet you don'y use either of them in the function so it will just be a constant, defined by the variables you do give which, I assume, are in the workspace at the time you create this function handle. I have no idea where t and y are supposed to fit into your equation though.
採用された回答
James Tursa
2019 年 2 月 11 日
E.g., for an anonymous function you need to give the input argument list first. E.g., for a generic derivative function that takes t and y as inputs, the syntax would be this:
dydt = @(t,y) some_expression_involving_t_and_y_goes_here;
11 件のコメント
その他の回答 (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!