i have one issue, i have matrix 760×5 how to findpeaks for every column without having to write findpeak in each column
this is the example coding that I used :
[pks1_p,loc1_p] = findpeaks(y_p(:,1),'MinPeakHeight',0.09,'MinPeakDistance',100);
[pks2_p,loc2_p] = findpeaks(y_p(:,2),'MinPeakHeight',0.09,'MinPeakDistance',100);
[pks3_p,loc3_p] = findpeaks(y_p(:,3),'MinPeakHeight',0.09,'MinPeakDistance',100);
[pks4_p,loc4_p] = findpeaks(y_p(:,4),'MinPeakHeight',0.09,'MinPeakDistance',100);
[pks5_p,loc5_p] = findpeaks(y_p(:,5),'MinPeakHeight',0.09,'MinPeakDistance',100);
the problem is I have to write findpeak one by one to see the value of each column. how to get findpeak to follow the number of columns that exist without having to be written one by one
but I need values from pks and loc of each column in the workspace :
Best Answer