Info

This question is closed. Reopen it to edit or answer.

Could i get matrix b from matrix a?

1 view (last 30 days)
ala alemaryeen
ala alemaryeen on 25 Nov 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi, i have the following matrix with the following values: a=[ 1 2 3 4 5; 6 7 8 9 10; 11 12 13 14 15 ] my question is, could i achieve the following matrix with the same values but different order, from the previous one:
b=[5 4 3 2 1; 10 9 8 7 6 ; 15 14 13 12 11] Thx,

Answers (1)

Image Analyst
Image Analyst on 25 Nov 2013
Use fliplr() to flip from left to right.
b = fliplr(a);
  2 Comments
ala alemaryeen
ala alemaryeen on 25 Nov 2013
how i can delete a column from a matrix?
Image Analyst
Image Analyst on 25 Nov 2013
columnToDelete = 2; % or whatever...
m(:, columnToDelete) = [];

Community Treasure Hunt

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

Start Hunting!