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

Problem 1323. Alternating sum

Created by Tim

Given vector x, calculate the alternating sum

   y = x(1) - x(2) + x(3) - x(4) + ...

Problem Group

Solution Statistics

95 correct solutions 47 incorrect solutions
Last solution submitted on Sep 09, 2014