a=[1,1,2;1,3,2;3,1,3;]
b=[9,13,14;]
i=0,j=0;
au=horzcat(a,b')
[m,n] = size(au)
for i=1:m
for j=i:n-1
if i==j && au(i,j) ~=0 && au(i,j)~=1
au(i,:)=au(i,:)/au(i,j)
temp=au(i,:);
else if i~=j
au(j,:)=au(j,i)*au(i,:)-au(j,:)
else
end
end
end
end
b=[9,13,14;]
i=0,j=0;
au=horzcat(a,b')
[m,n] = size(au)
for i=1:m
for j=i:n-1
if i==j && au(i,j) ~=0 && au(i,j)~=1
au(i,:)=au(i,:)/au(i,j)
temp=au(i,:);
else if i~=j
au(j,:)=au(j,i)*au(i,:)-au(j,:)
else
end
end
end
end
No comments:
Post a Comment