Delete the column with all 0 data in a matrix(x).
e.g.
input x =
1 0 0 4
5 0 7 0
9 0 11 0output y =
1 0 4
5 7 0
9 11 0
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers63
Suggested Problems
-
Get the length of a given vector
13786 Solvers
-
Set the array elements whose value is 13 to 0
1459 Solvers
-
Getting the indices from a matrix
735 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14383 Solvers
-
665 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Should include some test cases with negative numbers in the Test Suite. For example, several submissions would fail for x = [1, −1; −1, 1].