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 ??

 채택된 답변

Jan
Jan 2021년 7월 16일

0 개 추천

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;

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2021년 7월 16일

답변:

Jan
2021년 7월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by