Permutation Matrix on Matlab
48 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Zafer Sahin
am 9 Okt. 2021
Bearbeitet: Zafer Sahin
am 5 Mai 2022
Hi I am new on MATLAB. In my project I am using matlab. Some step of works wanted to find permuation matrix. AS you can see from photo given.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/762691/image.png)
So I need to find permutation matrix for A(sc). But I couldn't figure out how to make on MATLAB. I use below codes, it gives irrevalent result. T
A=[-1 -1 1;1 -1 0;-3 0 1;1 0 0]
B = perms(A);
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Okt. 2021
The description showed you the way:
ASc = [-1 -1 1;1 -1 0;-3 0 1;1 0 0]
[LSc, USc, PSc] = lu(ASc)
Note: the term "permutation matrix" in this context is not the same as is produced by perms() https://www.mathworks.com/help/matlab/ref/perms.html which "returns a matrix containing all permutations of the elements of vector v in reverse lexicographic order." The concepts do have a relationship, but perms() is not at all what you want for the purpose of building the kind of permutation matrix you need.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!