Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. data = Table[{x, RandomReal[{-.1, .1}] + x^2}, {x, 0, 15}]
  2.  
  3. lstplt = LinearModelFit[data, Table[x^i, {i, 2}], x]
  4. Plot[lstplt[x], {x, 0, 15}]
  5. reslist =
  6. Inner[List, {data}[[1, All, 1]], lstplt["FitResiduals"], List];
  7. Show[ListPlot[data], Plot[lstplt[x], {x, 0, 15}]]
  8. ListPlot[reslist]
  9. bres = Select[reslist, Abs[#[[2]]] > .07 &];
  10. gres = DeleteCases[reslist, Alternatives @@ bres];
  11. gpoints = gres[[All, 1]] [Intersection] reslist[[All, 1]];
  12. ListPlot[listtr3 = Select[data, gpoints~MemberQ~First[#] &]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement