Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A=[3 4 2 3; 4 2 1 5; 9 1 1 10]
- for r=1:3
- pv=A(r, r);
- for c=1:4
- A(r, c)=A(r, c)/pv;
- endfor
- for i=1:3
- if i==r
- continue;
- endif
- pv=A(i, r);
- for j=1:4
- A(i, j)=A(i, j)-pv*A(r, j);
- endfor
- endfor
- A
- endfor
- A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement