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
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers1979
Suggested Problems
-
Find the longest sequence of 1's in a binary sequence.
6682 Solvers
-
2009 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
884 Solvers
-
Implement a bubble sort technique and output the number of swaps required
381 Solvers
-
Given a square and a circle, please decide whether the square covers more area.
1713 Solvers
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!
good
you should add that the element is deleted by the index not the value