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'.

 Respuesta aceptada

David Hill
David Hill el 12 de Mzo. de 2021
M(6:11:end)=1;%for your Matrix M

3 comentarios

Afluo Raoual
Afluo Raoual el 12 de Mzo. de 2021
What is 6 and 11 please? and what about its general form if we have another matrix of other dimensions
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 el 12 de Mzo. de 2021
Thank you so much

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 12 de Mzo. de 2021

Editada:

el 15 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by