Cody

Problem 2223. Cumulative difference

Given an array, return the cumulative difference.

Example

 a = [ 1 3 5 7 ]
 cumdiff = [ 1 2 1 -2 ]

Solution Stats

52.7% Correct | 47.3% Incorrect
Last solution submitted on Aug 30, 2016

Problem Comments

Tags

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more