add column of zeros at end of matrix?
조회 수: 85 (최근 30일)
이전 댓글 표시
I have one matrix that I'm trying to add a column of zeros at the beginning and end of, but so far I can only figure out how to add the column of zeros at the beginning.
댓글 수: 0
답변 (1개)
Walter Roberson
2018년 10월 14일
zc = zeros(size(YourMatrix,1),1);
newmatrix = [zc, YourMatrix, zc];
댓글 수: 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!