Cycle for to save a matrix

2 次查看(过去 30 天)
Hey guys thanks in advance for reading this and helping me.
I have a matrix range_compression(2032 x 400). For each column of that matrix I want to apply a function(freq2time).This function transforms a vector in frequency domain to a vector in time domain.
I want that after the apllication of the function for each column of range_compression, it saves the variable range_compressed, column by column in another matrix. And for each time_compression variable, multiply by speed of light and save in another matrix.
How can I do this, thank you. This is the code I have, but im having difficulties on doing the rest
[nr,mr]=size(Range_compression);
for i=1:mr
[time_compression,range_compressed]=freq2time(mr,doppler_freqSurv);

采纳的回答

Matt J
Matt J 2022-6-11
[nr,mr]=size(Range_compression);
[time_compression,range_compressed]=deal(nan(nr,mr));
for i=1:mr
[time_compression(:,i),range_compressed(:,i)]=freq2time(mr,doppler_freqSurv);
end
time_compression=time_compression*speed_of_light;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by