Table of Contents
Delete a single row in matlab
In this article I will show simple examples to show how to delete a row in MATLAB? If we have a matrix of large order lets say m=rows=8, n=columns=10 and we want to delete a single row from it then look at the following example
Here, I have used a built in random function for generating a matrix with random entries of 8 rows and 10 columns..
Now, lets assume that I want to remove 5th row completely, then I will use the following command
A([5],:) = []
once you run this command on MATLAB, you will get the following result
Now it can be observed clearly that 5th row has been deleted
How to delete two rows in matlab
If you want to delete any two rows from above matrix A, say it 2, 3 then use the following syntax for it.
Also read here
https://eevibes.com/computing/how-to-take-integer-input-in-python/