cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

finding centroids of peaks in a 2D array

ptc-1398121
4-Participant

finding centroids of peaks in a 2D array

I have 2D arrays with multiple peaks in the array.  I need to extract the centroids of each peak.  I have MCAD14 with all the extensions but am not seeing any function that will help with that, but trying to avoid writing the whole matrix search algorithm myself.

 

I'd like the array positions of the centroids of the peaks shown in this plot as the red peaks.

ptc1398121_0-1716430536441.png

Any ideas that make this simple?

Thanks.

 

3 REPLIES 3
ttokoro
20-Turquoise
(To:ptc-1398121)

Even Prime can do it by localmax function, real mathcad can do it.

image.pngimage.pngimage.pngimage.png

ptc-1398121
4-Participant
(To:ttokoro)

That's a very good recommendation.  Unfortunately my data has a large maximum uniform value 'table' so localmax doesn't seem to be able to deal with that.  I could back off the gain on my data so the peaks are not saturated values, but then the shape of my data is more like the cone of a volcano with a central depression.  I may just have to write an algorithm myself for this.

Hello @ptc-1398121

 

It looks like you have a response from a community member. If it helped you solve your question please mark the reply as the Accepted Solution. Or if you found a solution by yourselves, please document it in your topic and mark it as accepted solution. This should surely help other users who may have a similar question.

Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Community Moderation Team.

Announcements

Top Tags