Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Moving Specific Values In Matrix By One Column

3 Ansichten (letzte 30 Tage)
DANIEL PEARCE
DANIEL PEARCE am 28 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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.

Antworten (1)

Mayank Bajpai
Mayank Bajpai am 30 Okt. 2020
circshift(x,-1,2)

Diese Frage ist geschlossen.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by