Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. % Input
  2. A = [1 2 3 4 5 6 7 8 9 10]
  3.  
  4. % Interval of allowed numbers.
  5. dE = 3;
  6.  
  7. % Rounding
  8. B = round(A,dE); % Does not work like I desire.
  9.  
  10. % Desired output
  11. B == [0 3 3 3 6 6 6 9 9 9 ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement