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