Periodogram loop for multiple columns
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Rivers Cuomo
am 1 Sep. 2022
Beantwortet: Mathieu NOE
am 2 Sep. 2022
I have a matrix with 240 columns and I need to create a periodogram for each. How do I go from creating a peridogram for one column, to creating a loop to process all 240?
[amp, freq]=periodogram(detrend(seis(:,1)),[],[],Fs);
0 Kommentare
Akzeptierte Antwort
Mathieu NOE
am 2 Sep. 2022
hello
we should have freq the same for all 240 columns so we are not obliged to store 240 versions of the same vector
on the other side we can store the result amp in an 2D array - using the for loop :
for ci = 1:240
[amp(:,ci), freq]=periodogram(detrend(seis(:,ci)),[],[],Fs);
end
plot(freq,amp);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!