how to add the sequences in the mat lab?

조회 수: 12 (최근 30일)
krithika P
krithika P 2012년 7월 11일
for ex i have sequences A=[1 2 3 4]
B=[1 2 ]
i want to add the zeros in the B sequence by comparing the length..
  댓글 수: 1
krithika P
krithika P 2012년 7월 11일
how to add.. is there any inbuilt command

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

채택된 답변

Conrad
Conrad 2012년 7월 11일
Did you mean something like this?
A = [1 2 3 4];
B = [1 2];
B = [B zeros(1,length(A)-length(B))];
B will then be equal to [1 2 0 0].

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by