Cycle for to save a matrix

2 views (last 30 days)
Miguel Albuquerque
Miguel Albuquerque on 11 Jun 2022
Answered: Matt J on 11 Jun 2022
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);

Accepted Answer

Matt J
Matt J on 11 Jun 2022
[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;

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!