Indexing and Iteration issues

10 ビュー (過去 30 日間)
migs
migs 2017 年 4 月 26 日
編集済み: Stephen23 2017 年 4 月 28 日
Input:
for j=1:NS
tsr(j)=((r(j)*rot)/v); %TSR
end
For loop iteration
X(j) requires tsr(j) and a(j).
Both X(j) and a(j) changes every loop.
Before, I use X1(i-1), X2 (i-1).
After receiving suggestions from this forum to use indexing instead, I revised the code using indexing (still a newbie ^^,)
Any idea on how to approach this? It seems I have to deal with X(j,i-1) where j, indexes to 20 variables (equal to X1,X2, X20) and i has something to do with iteration.
Kind regards,
Wes
  5 件のコメント
Greg Dionne
Greg Dionne 2017 年 4 月 27 日
編集済み: KSSV 2017 年 4 月 28 日
Stephen23
Stephen23 2017 年 4 月 28 日
編集済み: Stephen23 2017 年 4 月 28 日

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by