フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Moving Specific Values In Matrix By One Column

1 回表示 (過去 30 日間)
DANIEL PEARCE
DANIEL PEARCE 2020 年 10 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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.

回答 (1 件)

Mayank Bajpai
Mayank Bajpai 2020 年 10 月 30 日
circshift(x,-1,2)

この質問は閉じられています。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by