Code wont work keeps giving error message: Argument to dynamic structure reference must evaluate to a valid field name.
12 ビュー (過去 30 日間)
古いコメントを表示
this is my code:
t=0:0.001:10; wn= 0.898; a= 0.843; z= 0.005122; wd=0.897;
y= a*(exp.(-z*wn*t))*(sin(wd*t)) and I keep getting the same error message can someone help please thanks
0 件のコメント
回答 (2 件)
Star Strider
2017 年 9 月 30 日
Put the ‘dot operator’ here instead:
y = a*(exp(-z*wn*t)) .* (sin(wd*t))
↑
That will do the element-wise multiplication you intend.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!