MATLAB: How to assign new name for a matrix that has one row removed

programming

Hi I know how to delete a row from a matrix, but I don't know how to assign a new name for it.
For example:
>> A = [1;2;3;4]
>> A(3,:) = [] %this will delete the third row
Can I change the name of the new matrix? For example, the old matrix A [1;2;3;4] and new matrix B [1;2;4]

Best Answer

If you want to rename the matrix:
A = [1;2;3;4]
B = A ;
B(3,:) = [] %this will delete the third row

If you don't want to rename
A = [1;2;3;4]
A(3,:) = [] %this will delete the third row