Remove element(s) from cell array - MATLAB Cody - MATLAB Central

Problem 1971. Remove element(s) from cell array

Difficulty:Rate
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty. For example
A = 1:10
A(5) = []
results in
1 2 3 4 6 7 8 9 10
You task is to find the shortest, elegant, way in Matlab to do the same for cell arrays. Regexp, eval, and other workarounds that trick mtree are considered stupid, and will not be appreciated.

Solution Stats

41.88% Correct | 58.12% Incorrect
Last Solution submitted on Feb 21, 2025

Problem Comments

Solution Comments

Show comments
MATLAB Without Borders: Connecting your projects with Python and other Open Source Tools.
On 27th February María Elena Gavilán Alfonso and I will be giving...
0
4

Problem Recent Solvers1741

Suggested Problems

More from this Author31

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page