Problem 44. Trimming Spaces

Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32).

 Input  a = ' singular value decomposition  '
 Output b is 'singular value decomposition'

Solution Stats

31.32% Correct | 68.68% Incorrect
Last solution submitted on Oct 19, 2017

Problem Comments

Solution Comments

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!