フィルターのクリア

How to change a bit of matrix from 0 to 1

2 ビュー (過去 30 日間)
Afluo Raoual
Afluo Raoual 2021 年 3 月 12 日
編集済み: Afluo Raoual 2021 年 3 月 15 日
Dear members,
I have a matrix
and I have to write a program that verify if the final bits are '0' or '1'. If final bits are '0' the program change them to '1'.

採用された回答

David Hill
David Hill 2021 年 3 月 12 日
M(6:11:end)=1;%for your Matrix M
  3 件のコメント
David Hill
David Hill 2021 年 3 月 12 日
6=size(M,1)+1
11=size(M,1)*2+1
M(size(M,1)+1:size(M,1)*2+1:end)=1;
Afluo Raoual
Afluo Raoual 2021 年 3 月 12 日
Thank you so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by