필터 지우기
필터 지우기

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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by