How to change a bit of matrix from 0 to 1

1 次查看(过去 30 天)
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;

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by