Howe can I subtract neighboring numbers?
1 view (last 30 days)
Show older comments
Hello,
I got a matrix like this:
>> z=[1,2,3,4]
z =
1 2 3 4
How can I substract the neighboring numbers?
Like 2-1; 3-2; 4-3; etc.
And how can I divide every number by 60 ?
Like 1/60 2/60 etc
0 Comments
Accepted Answer
Andrei Bobrov
on 7 Jul 2019
diff(z)
z/60
5 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!