how to ➢get zeros beneath the pivot in each column.
조회 수: 1 (최근 30일)
이전 댓글 표시
function [x] = g_elimination( A,b )
[M,N] = size(A);
if M ~= N
error('Matrix A is not a square') ;
end
댓글 수: 0
답변 (1개)
Monisha Nalluru
2020년 11월 20일
Hi Ahmed,
From my understanding, you want to add a row of zeros to matrix. This can be done in many ways,
First create a zeros matrix of required 1 by N where N is number of columns. After use direct assignment or cat function
As an example
A=[1 2 3; 3 4 5; 6 7 8];
Z=zeros(1,3);
newarray=[A;Z]
or
newarray= cat(1,A,Z)
댓글 수: 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!