Convert equation into code
1 ビュー (過去 30 日間)
表示 古いコメント
この 質問 は Star Strider
さんによってフラグが設定されました
Convert this into matlab code
c1 = 2 ; c2 = 4 ; c3 = 5
J = [10 20 30 40 50]
O = same size as J
On+1 =c1*Jn+1 + c2*Jn + c3*On
help me with this code
回答 (1 件)
Voss
2022 年 11 月 27 日
c1 = 2;
c2 = 4;
c3 = 5;
J = 10:10:50;
O = zeros(size(J));
O(1) = J(1);
for n = 1:numel(O)-1
O(n+1) = c1*J(n+1) + c2*J(n) + c3*O(n);
end
0 件のコメント
参考
カテゴリ
Find more on Simscape Electrical in Help Center and File Exchange
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!