フィルターのクリア

save data calculated in a loop

1 回表示 (過去 30 日間)
Kugen Raj
Kugen Raj 2012 年 3 月 8 日
im calculating a 3db beamwidth for an array with elements ranges from (10-100). then, i will find for the -3db gain in each loop and calculate the beamwidth. how do i save all this value in a same place so that i can plot a graph?

採用された回答

Thomas
Thomas 2012 年 3 月 8 日
This video should help:
href=""<http://blogs.mathworks.com/videos/2007/08/20/matlab-basics-video/</a>>
You can svae the output in a vector or matrix as shown,
Eg:
for i=1:10
y(i)=i+rand; % us y(i) so that it is written as a vector
end
or you could use:
z=[];
for i=1:10
z=[z i+rand];
end
both should give you similar results..
  2 件のコメント
Kugen Raj
Kugen Raj 2012 年 3 月 8 日
thanks for the help.
Oleg Komarov
Oleg Komarov 2012 年 3 月 18 日
Please accept his answer if you think he answered yuor question.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by