I have a matrix M whose size is 96 x1, I have to insert zero from 89th row to 170 th row..Any idea how to do this ??

 Respuesta aceptada

Jan
Jan el 16 de Jul. de 2021

0 votos

You cannot "insert" a 0 in row 170, if the vector has 96 rows only. You can append zeros only:
x = rand(96, 1);
x(89:170) = 0;

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 16 de Jul. de 2021

Respondida:

Jan
el 16 de Jul. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by