Export peak labels with raw data findpeaks MATLAB

조회 수: 3 (최근 30일)
Jon Schofield
Jon Schofield 2018년 7월 5일
댓글: Image Analyst 2018년 7월 6일
I'm using find peaks to find local maxima or minima. I'd like to be able to export the original data in .csv format alongside a label indicating the peak number from a cumulative count of the identified peaks.
I'm able to locate and number the peaks fine but can only create an array of the peak locations and numbers, for the attached example it would be a 35 row array.
I'd like to create a table in the same format as attached here from some demo data created in excel.
Any suggestions would be very much appreciated.
Jon

답변 (1개)

Image Analyst
Image Analyst 2018년 7월 5일
편집: Image Analyst 2018년 7월 5일
Nothing is attached. You somehow forgot to do that. Please attach your data and code with the paper clip icon. You should see the files listed on your question if you've successfully attached them.
You can create the table from the double vectors that findpeaks() gives you using the table() function.
Then use writetable() to write that table to an Excel workbook file.
  댓글 수: 2
Jon Schofield
Jon Schofield 2018년 7월 5일
Thanks for the answer, please see the attached file. I can make a table of the findpeaks vectors alone, it's lining it up with raw data that I'm struggling with.
Hope the file explains better and thanks again for the comment.
Image Analyst
Image Analyst 2018년 7월 6일
Sigh. Jon, you again forgot to attach your code. Please make it as easy as possible for people to help you, by helping them help you. You say you have code to make a table, find peaks, etc. yet you want people to recreate all that code when you already have it?! Most people would probably rather not and just wait for you to attach it. After all, they're in no rush. I'll check back tomorrow for it, after you've read this link.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by