How to find relative maximums and minimums of a sequence of points in list form?

jospercomp shared this question 1 month ago
Answered

l1=Sequence((i,sin(i)),i,0,10,0.01)

Best Answer
photo

maybe this?

Comments (8)

photo
1

Have you tried eg

Max(x(l1))

photo
1

This is Maximum Absolute. I am looking for Maximum Relative list. Maximum Relative is where there are concavity down. Minimum Relative is where there are concavity up.

photo
1

Max(Séquence(y(Elément(l1, i)), i, 1, 100))


Min(Séquence(y(Elément(l1, i)), i, 1, 100))

photo
1

This are only Maximum and Minimum Absolute. I want Maximum and Minimum Relative.

photo
photo
2

maybe this?

photo
2

from rami's points other method

Files: foro.ggb
photo
1

I like their methods because they are very interesting and complicated. I had thought of something like this; but it does not work for cases where there is noise in the data. This only worked with charts with smooth data.

Maximum Local Lists

RemoveUndefined(Sequence(If(y(Element(l1, i - 1)) < y(Element(l1, i)) ∧ y(Element(l1, i + 1)) < y(Element(l1, i)), Element(l1, i)), i, 2, Length(l1) - 1, 1))

Minimum Local Lists

RemoveUndefined(Sequence(If(y(Element(l1, i - 1)) > y(Element(l1, i)) ∧ y(Element(l1, i + 1)) > y(Element(l1, i)), Element(l1, i)), i, 2, Length(l1) - 1, 1))

photo
1

noise in the data

Then you need to fit a curve with one of the Fit...() commands first

© 2020 International GeoGebra Institute