SHARE
TWEET

Untitled

a guest Nov 12th, 2019 117 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. A=[3 4 2 3; 4 2 1 5; 9 1 1 10]
  2.  
  3.  
  4. for r=1:3
  5.   pv=A(r, r);
  6.   for c=1:4
  7.     A(r, c)=A(r, c)/pv;
  8.   endfor
  9.  
  10.   for i=1:3
  11.    if i==r
  12.      continue;
  13.     endif
  14.    
  15.     pv=A(i, r);
  16.     for j=1:4
  17.       A(i, j)=A(i, j)-pv*A(r, j);
  18.     endfor
  19.    
  20.    
  21.   endfor
  22.  
  23.   A
  24.  
  25. endfor
  26. A
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top