Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. step = 0.1;
  2. N = 2551;
  3. x = 0;
  4. y = 0;
  5.  
  6. for i = 1:N
  7. y = y + 0.5*x + (x*x)*cos(floor(x/4)-32);
  8. x = x + step;
  9. end
  10.  
  11. fprintf('%f \n', y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement