필터 지우기
필터 지우기

Insert zeros into matrix in matlab

조회 수: 2 (최근 30일)
Atreyu91
Atreyu91 2015년 8월 24일
댓글: Atreyu91 2015년 8월 25일
I am trying to insert zeros into a matrix, an example is as follows:
[1;2]
to
[1;0;0;0;0;2]
Can anyone please show me how to perform this in matlab?
  댓글 수: 1
Hikaru
Hikaru 2015년 8월 24일
Can you be more specific? Do you have any conditions that need to be fulfilled to insert the zeroes?

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2015년 8월 24일
B = [A(1); zeros(4,1); A(2)];
  댓글 수: 1
Atreyu91
Atreyu91 2015년 8월 25일
I could not find an example anywhere that put it this simply, thank you!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by