Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12262

Re: Understanding issue

$
0
0

I guess you are supposed to write a program to find the local maximas, not to visually spot and mark them.

You would run through all the points using a for-loop and if you find a point which is higher than its two neighbours you store this value and its corresponding x-value in a matrix which is returned at the end of the program.

You should have learned about programming, loops and if-conditions to do so.

 

Dealing with the special case like endpoints and consecutive equal data would be the next step, if necessary.

 

BTW, the plotting of the sample data can be done a bit less cumbersome using your matrix G directly and plotting the second column over the first:

28.11.png


Viewing all articles
Browse latest Browse all 12262

Trending Articles