How to store the [pks,locs] into a matrix, from a looping?

조회 수: 3 (최근 30일)
Ana Bianco
Ana Bianco 2019년 9월 18일
답변: Abhishek Gupta 2020년 12월 16일
Hi all, I'm trying to find natural frequencies, from some FRF's I have.
I already extracted the absolute values of the FRF's (they were in imaginary and real numbers), and I have ploted some graphs, with the frequency vector on the x axis.
Here are the data:
absolutevalues(800x270) - 270 points measured with 800 samples.
Fv = linspace(0,8,size(absolutevalues,1))*1000 ---- the frequency sample is 8000Hz
Trying to find the natural frequencies (peaks) I did this (for only 40 peaks):
peakValues = zeros(40,270);
for m = 1: size(absolutevalues,2)
pks(40,m) = findpeaks(absolutevalues(:,m), Fv, 'NPeaks', 40);
peakValues(:, m) = pks (40,m);
end
The problem is: it only gives me back the peak values for the last value of m (270). How can I store them in this peakValues matrix I created?
Thank you in advance!

답변 (1개)

Abhishek Gupta
Abhishek Gupta 2020년 12월 16일

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by