I want to show my Peaks inside a plot.
findpeaks seems to be the only thing that can do this.
But unfortunatly I can't get it to work with arrays.
for i =1:15
[pk_Moment {:,i}, lk_Freq {:,i}] = findpeaks(FFT_Moment {1,i}(:,1), FFT_Freq {1,i}(1,:));
end
Can Anybody show me how it's done?

댓글 수: 2

KSSV
KSSV 2020년 11월 6일
What error you get with the above?
MeitiLuk
MeitiLuk 2020년 11월 6일
Invalid use of operator.

댓글을 달려면 로그인하십시오.

 채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 6일
편집: Ameer Hamza 2020년 11월 6일

0 개 추천

The left side should be like this
[pk_Moment{i}, lk_Freq{i}] = findpeaks(FFT_Moment {1,i}(:,1), FFT_Freq {1,i}(1,:));

댓글 수: 4

Now I get this error
An array for multiple LHS assignment cannot contain expressions.
Ameer Hamza
Ameer Hamza 2020년 11월 6일
Try removing the space on LHS of the assignment as shown in my updated answer.
MeitiLuk
MeitiLuk 2020년 11월 6일
Yes now it worked
Thanks!
Ameer Hamza
Ameer Hamza 2020년 11월 6일
I am glad to be of help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2020년 11월 6일

댓글:

2020년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by