Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.34 KB | None | 0 0
  1. function y=harm(n)
  2.     suma = 0;
  3.     for k = 1:n do
  4.         suma = suma + 1/k;
  5.     end
  6.     y = suma
  7. endfunction
  8.  
  9. for k = 1:100 do
  10.     x(k)= 100*k
  11.     eul(k)=harm(100*k) - log(100*k)
  12. end
  13. blad = abs(eul-0.5772156649)
  14. X = log(x)
  15. Y = log(blad)
  16. [a, b] = mnkw(X, Y)
  17. disp(-a, "Rząd zbieżnosci metody obliczania przyblizenia stalej Eulera")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement