Moving Specific Values In Matrix By One Column
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
I have a 3x3 matrix in the form of X = [0 1 0; 0 0 1; 0 1 0]. If a value is equal to one, I want to shift it to the left by one column. So, X' should look something like X' = [1 0 0; 0 1 0; 1 0 0]. I'm having some trouble doing this, so any help would be appreciated. Thanks.
Réponses (1)
Mayank Bajpai
le 30 Oct 2020
0 votes
circshift(x,-1,2)
Cette question est clôturée.
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!