How to find permutation cycle in matlab?

조회 수: 4 (최근 30일)
Ammy
Ammy 2018년 2월 10일
답변: Ammy 2018년 2월 10일
A=
4 1 2 3
1 2 3 4
2 3 4 1
3 4 1 2
I define a function
s4(i)=j for which i , j = 4
as in my case
s4(1)=1
s4(2)=4
s4(3)=3
s4(4)=2
and find permutation as; (1)(24)(3)
How can I find these cycles in matlab ?

답변 (1개)

Ammy
Ammy 2018년 2월 10일
No, sorry I want to find the position of a number in a matrix then I define a mapping and I want to write in a cycle as I explained in my example.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by