zero fill
조회 수: 60 (최근 30일)
이전 댓글 표시
hello i need to make matrix [42X60] from matrix [42x52] how can i make it by filling with zeros? thank u very much!
댓글 수: 0
채택된 답변
Arturo Moncada-Torres
2011년 5월 15일
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 ;-) !
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!