フィルターのクリア

How can i keep the results of for loop iteration in every step

2 ビュー (過去 30 日間)
Zuy
Zuy 2018 年 10 月 29 日
コメント済み: Zuy 2018 年 10 月 29 日
I am trying to calculate a sum series. Series upper limit chance btw 4:2:16 and i want to keep for loop iterations in an array cause i will make a plot N vs Stot.
syms j
for N=4:2:16
S(i)=(symsum(cos((20*pi*j)/(N+1)),j,0,N))
Stot=(2*pi/(N+1))*S;
double(Stot)
end

採用された回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 10 月 29 日
編集済み: KALYAN ACHARJYA 2018 年 10 月 29 日
use
slot(i)=(2*pi/(N+1))*S;
Example:
for i=1:10;
k(i)=2+i;
end
Command Window
>> k
k =
3 4 5 6 7 8 9 10 11 12
  6 件のコメント
Zuy
Zuy 2018 年 10 月 29 日
Zuy
Zuy 2018 年 10 月 29 日
i am using S1 formula. İ want to chance N like N=4:2:16 it is 10 in this case but at the same time i want to keep all of summation results in an array cause i will make a plot from them.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by