Matrix transform due to reorder of the equation row number, for AX=b

1 次查看(过去 30 天)
Hi,
I'd like to solve equation AX=b, e.g., [a11, a12, a13; a21, a22, a23; a31, a32, a33]*{x1, x2, x3}'={b1,b2,b3}'
However, I'd like to reorder X vector by {x2, x1, x3}', so is there any matlab code can do the row and column transform for matrix A?
Thanks.
  3 个评论
David Zhang
David Zhang 2013-9-25
I have to reorder elements of vector x and b, so rows and columns of A should be switched.

请先登录,再进行评论。

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-9-25
A= A(:,[2 1 3])
b=b([2 1 3])
  5 个评论
David Zhang
David Zhang 2013-9-25
Hi Azzi, how A should be changed if elements of b should also be switched as b=b([2 1 3])

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by