Remove entire row and column in the matrix containing the input values - MATLAB Cody - MATLAB Central

Problem 1429. Remove entire row and column in the matrix containing the input values

Difficulty:Rate

Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. For example x is given by x =

     8     1     6
     3     5     7
     4     9     2

and I specify an input value of n=3. The value 3 is in 2nd row and 1st column. So the output matrix should remove entire 2nd row and 3rd column. Output:[ 1 6; 9 2]

remember the input value can be vector too !

Solution Stats

31.2% Correct | 68.8% Incorrect
Last Solution submitted on Jun 13, 2025

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
2
3

Problem Recent Solvers431

Suggested Problems

More from this Author9

Problem Tags

Community Treasure Hunt

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

Start Hunting!