How to store the [pks,locs] into a matrix, from a looping?
2 views (last 30 days)
Show older comments
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!
0 Comments
Answers (1)
Abhishek Gupta
on 16 Dec 2020
Hi,
Referring to the following MATLAB Answers, which might help you in resolving the issue: -
0 Comments
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!