フィルターのクリア

how to set anti diagonal part of matrix with zero value elements ?

3 ビュー (過去 30 日間)
ajeet verma
ajeet verma 2017 年 3 月 8 日
コメント済み: Walter Roberson 2017 年 3 月 9 日
i know that how to set diagonal part of matrix to zero, for that we have a code m=256; n=256; a=ones(m,n); u=triu(a); imshow(u);
but in case of anti diagonal what will be code?

採用された回答

Nicolai Sanders
Nicolai Sanders 2017 年 3 月 8 日
I think this might do what you need.
m=256; n=256; a=ones(m,n); u=flip(triu(a)); imshow(u);
Look at the help page for "flip" to see the options.
  2 件のコメント
ajeet verma
ajeet verma 2017 年 3 月 9 日
thanks for giving me answer but 'flip' is not working instead of this i have tried 'flipud' that give me required result
Walter Roberson
Walter Roberson 2017 年 3 月 9 日
flip was new as of r2013b

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by