hello i need to make matrix [42X60] from matrix [42x52] how can i make it by filling with zeros? thank u very much!

 채택된 답변

Arturo Moncada-Torres
Arturo Moncada-Torres 2011년 5월 15일

6 개 추천

You can try something like this:
oldMatrix = ones(42,52); % The original matrix
newMatrix = zeros(42,60); % The new matrix (with zeros)
newMatrix(1:42, 1:52) = oldMatrix; % Overlap the original matrix in the new matrix
Hope it helps ;-) !

댓글 수: 2

itsik
itsik 2011년 5월 15일
thanks!!!!!!
Arturo Moncada-Torres
Arturo Moncada-Torres 2011년 5월 16일
You are welcome ;)

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

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by