Transposing 5x5x5 matrix
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Özgür Alaydin
am 24 Sep. 2020
Kommentiert: Özgür Alaydin
am 24 Sep. 2020
Hello all,
I am trying to transpose 5x5x5 matrix but then i get a warning and it says "use permute".
When use function like : permute(r,[5,5,5]) (r is 5x5x5 matrix).
I have this error:
Error using permute
ORDER contains an invalid permutation index.
How can i transpose this matrix? I need to transpose thise matrix and multply it with another 5x5x5 matrix. I have added the matrix.
Thanks for help
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Ameer Hamza
am 24 Sep. 2020
Bearbeitet: Ameer Hamza
am 24 Sep. 2020
You need to specify the order of the dimensions after transpose. It should be something like this
permute(r, [2, 3, 1])
It means that after permute, the dimension which was at 2nd location will move to the 1st location, 3rd to 2nd, and 1st to the 3rd location.
For example, transpose is equivalent to
permute(M, [2 1]); % M is 2D matrix, this command is equivalent to transpose
5 Kommentare
Ameer Hamza
am 24 Sep. 2020
Yes, then permute will return 5x5x5 matrix. You can then do element-wise multiplication.
Siehe auch
Kategorien
Mehr zu Matrices and 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!