how to reverse matrix?
39 次查看(过去 30 天)
显示 更早的评论
i want to reverse the order of row or column, example if i have matrix
2 4 7
7 8 5
it will become(column)
7 4 2
5 8 7
or(row)
7 8 5
2 4 7
0 个评论
回答(1 个)
Image Analyst
2013-1-25
编辑:Image Analyst
2013-1-25
You can use the functions flipud() and fliplr(). Here's the code:
A=[2 4 7
7 8 5]
A_Left_Right = fliplr(A)
A_Up_Down = flipud(A)
In the command window:
A =
2 4 7
7 8 5
A_Left_Right =
7 4 2
5 8 7
A_Up_Down =
7 8 5
2 4 7
2 个评论
Tarek Msolli
2020-11-19
some say that he's still waiting for a feedback to this very day, others say he gave up and decided to take his life out for the his never been able to confess his feeling to Eri, but no one is truly sure.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!