I want to get the output removing only a single row and returning rest rows using matlab.
For eg: Consider a matrix
A = [1 1 1; 2 2 2; 3 3 3; 4 4 4]
For case1, I need to have a separate matrix where first matrix is displaying the desired rows and other matrix displays the rest rows.
like B=1 then output will be two matrix where first matrix will be
C = [1 1 1]
and another matrix will be
D = [2 2 2; 3 3 3; 4 4 4]
similarly in next case B=2
then
C = [2 2 2]
D = [1 1 1; 3 3 3; 4 4 4]
How to write a matlab program for such case?
Try this, given your definitions of
AandBI expect you can easily wrap these up into a function.