Cody

Problem 1323. Alternating sum

Created by Tim in Community

Given vector x, calculate the alternating sum

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

Solution Stats

49.59% Correct | 50.41% Incorrect
Last solution submitted on Feb 07, 2019

Problem Comments

Recent Solvers394

Suggested Problems

More from this Author11

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!