Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. format long
  2.  
  3. T = 1.047197551196598
  4. for i= 1:6 % works fine with 6 iterations
  5. x = atan(10^(-i+1))
  6. n = floor(T/x)
  7. y(i) = n
  8. m(i) = x
  9. T = T - n*x
  10.  
  11. end
  12. % let A be a 1x8 matrix of the values y(i) from i=1 to i=8
  13. A = [ 1, 2, 6, 2, 4, 6]
  14. % let B be a 1x8 matrix of the values of m(i) for i=1 to i=8
  15. B = [0.785398163397448, 0.099668652491162, 0.009999666686665, 0.000999999666667, 0.000099999999667, 0.000010000000000]
  16. % check to see if our found integers multiplied respective basis work
  17. dot(A,B)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement