Advertisement
Wojtekd

Modelowanie

May 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.40 KB | None | 0 0
  1. rows = List[];
  2. n = 1;
  3. While[n <= 500,
  4.  r0 = points[[n, 1]]^2 + points[[n, 2]]^2 + points[[n, 3]]^2;
  5.  rows = Append[rows, {r0, n, r0/n}];
  6.  n = n + 1]
  7.  
  8. srednia = Mean[rows[[All, 3]]];
  9. odchylenie = StandardDeviation[rows[[All, 3]]];
  10.  
  11. Print["Średnia:", srednia];
  12. Print["Odchylenie standardowe:", odchylenie];
  13.  
  14. rows = Insert[rows, {"r^2", "t", "r^2/t"}, 1];
  15. Grid[rows[[;; ;; 10]], Frame -> All]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement