HOW TO MOVE THE DIAGONAL ELEMENTS IN MATRIX (ONE PIXELS) FOR IMAGE PROCESSING
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
HOW TO MOVE THE DIAGONAL ELEMENTS IN MATRIX (ONE PIXELS) FOR IMAGE PROCESSING
2 Commenti
Risposta accettata
Andrei Bobrov
il 12 Set 2012
Modificato: Andrei Bobrov
il 12 Set 2012
I = [1 2 4
2 5 6
1 3 8 ];
ii = 1:size(I,1)+1:numel(I);
I(ii) = I(ii(mod(ii - 2,3)+1));
or
I(eye(size(I))>0) = circshift(diag(I),1);
Più risposte (2)
Sean de Wolski
il 11 Set 2012
3 Commenti
Sean de Wolski
il 12 Set 2012
Modificato: Sean de Wolski
il 12 Set 2012
So she's not a deer during hunting season :)
Image Analyst
il 12 Set 2012
Ah - I thought she was like a rescue dog, locating and pulling people from rubble after earthquakes.
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!