1

I am interested to calculate the mean of a certain set of points of a graphed curve. Any advice is really appreciated.

LCarvalho
  • 9,233
  • 4
  • 40
  • 96
sam
  • 21
  • 1
  • 1
    Could you give a (minimal) example? – eldo Jul 07 '17 at 10:59
  • 1
    Have you tried using Mean? You should provide a minimal working example of what you are trying to accomplish, otherwise you will hardly get any answer – glS Jul 07 '17 at 11:04
  • I have a graph with a set of coordinates (points) that show a certain curvature (e.g. maximum). I want to specify these points in the "mean" in order to calculate the mean of these points. – sam Jul 07 '17 at 11:04
  • What is the input (a plot?) and expected output? Where are you stuck because I'm assuming you are familiar with Mean. – Kuba Jul 07 '17 at 11:44
  • Este não volta mais... Há uma semana não voltou pra ver a resposta – Luciano Jul 15 '17 at 04:18

1 Answers1

2

Here a example:

res[x_] := x^2 + 5
x = Range[-1, 10]
Mean[res[#] & /@ x] // N
points = Transpose[{x, res[x]}];
Plot[res[x], {x, -1, 10}, 
 Epilog -> {Red, PointSize[0.02], Point[points]}]

{-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

37.1667

enter image description here

LCarvalho
  • 9,233
  • 4
  • 40
  • 96