Cycle for to save a matrix

1 visualización (últimos 30 días)
Miguel Albuquerque
Miguel Albuquerque el 11 de Jun. de 2022
Respondida: Matt J el 11 de Jun. de 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);

Respuesta aceptada

Matt J
Matt J el 11 de Jun. de 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;

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by