Save variable to a matrix after a for loop
古いコメントを表示
Hey guys this is probably very easy, but Im having troubles doing it.
I have this code, that cross-correlates two signals, from 2 matrixes. I would like to save all the outputs of the function in 3 matrixes(afmag3,delay3,doppler3). Also the code, takes too long to run , I dont know if this can be better. Thank you
[n,m]=size(surv_matrix);
[n2,m2]=size(ref_matrix);
for i=1:m
for ii=1:m2
Reference_SignalCut=ref_matrix(:,ii);
Surveillance_SignalCut=surv_matrix(:,i);
[afmag3,delay3,doppler3] = ambgfun(Reference_SignalCut,Surveillance_SignalCut,fs,[1e6 1e6]);
afmag3 = afmag3*1; % Select plot gain *1
afmag3(afmag3>1 )= 1;
end
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!