how to flatten a matrix in row major order
1,070 次查看(过去 30 天)
显示 更早的评论
hi , how do i flatten a matrix in row major order. thanks.
0 个评论
采纳的回答
更多回答(1 个)
Zhendong Zhao
2015-8-16
B=A'; B(:)'
1 个评论
Walter Roberson
2015-8-16
Using ' instead of .' makes extra work because ' is conjugate transpose. Your code does the conjugate transpose twice so you do end up with the original values, but it is work that doesn't have to be done.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!