Given an array, return the cumulative difference.
Example
a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers75
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3724 Solvers
-
Getting the indices from a vector
12325 Solvers
-
Reverse the elements of an array
1141 Solvers
-
Generate a random matrix A of (1,-1)
432 Solvers
-
648 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!