RREF not giving reduced echelon form

5 views (last 30 days)
Adnan Jahangir
Adnan Jahangir on 10 Oct 2015
Edited: Walter Roberson on 10 Oct 2015
Dear!
I am having a system of 5 linear equations, with 5 unknowns to be determined. When I use the command of rref (A) on the matrix A (Augmented matrix) then instead of reduced echelon form it gives all the entries in first row, and making remaining 4 rows as zero rows, could not understand why is happening so.
1) here I represent the part of program where I represented this operation
for i=2:1:length(O)
QQQ =[M1(i,1) M1(i,2) M1(i,3) M14(i,1) 0 b1(i,1);M2(i,1) M2(i,2) M2(i,3) M24(i,1) 0 b2(i,1);M3(i,1) M3(i,2) M3(i,3) 0 0 b3(i,1);M4(i,1) M4(i,2) M4(i,3) 0 M45(i,1) b4(i,1);M5(i,1) M5(i,2) M5(i,3) 0 M55(i,1) b5(i,1)];
RR=rref(QQQ)
II(i,:) =RR(1,6)
end
where each M is defined properly,
result for the value of i=2 are as follows
-3.6035e+050 -1.0331e+035i 3.2541e+021 +6.1677e+019i -5.1763e+020 -2.5318e+020i -2.3565e+019 0 7.2761e+018
0.12558 -8.6149e+014i -2.5881 - 0.024521i 0.24839 - 1.0585i -0.99606 0 0.86678
-2.1361e+049 +4.8846e+064i -1.2606e+021 -3.7042e+019i -6.8697e+019 +1.0156e+020i 0 0 7.1063e+048 +2.0718e+033i
-1.513e+017 + 1.038e+033i -2.1573e+005 - 6339i -7837.5 + 11586i 0 0.0050625 - 7.79e+013i -1.5087e+017 -9.9402e-015i
2.1361e+059 -4.8846e+074i 1.2606e+031 +3.7042e+029i 6.8697e+029 -1.0156e+030i 0 0.00021977 -3.0093e-036i -7.1063e+058 -2.0718e+043i
in command window it looks alike
1.0e+074 *
Columns 1 through 5
-0.0000 - 0.0000i 0.0000 + 0.0000i -0.0000 - 0.0000i -0.0000 0
0.0000 - 0.0000i -0.0000 - 0.0000i 0.0000 - 0.0000i -0.0000 0
-0.0000 + 0.0000i -0.0000 - 0.0000i -0.0000 + 0.0000i 0 0
-0.0000 + 0.0000i -0.0000 - 0.0000i -0.0000 + 0.0000i 0 0.0000 - 0.0000i
0.0000 - 4.8846i 0.0000 + 0.0000i 0.0000 - 0.0000i 0 0.0000 - 0.0000i
Column 6
0.0000
0.0000
0.0000 + 0.0000i
-0.0000 - 0.0000i
-0.0000 - 0.0000i
after applying rref(QQQ) I get
1 -7.5834e-046 +2.5808e-044i 2.0791e-045 +1.4064e-045i 0 1.9676e-094 +4.4992e-079i -2.1208e-032 -1.4548e-016i
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
  1 Comment
Walter Roberson
Walter Roberson on 10 Oct 2015
Edited: Walter Roberson on 10 Oct 2015

To help people with data entry for testing:

M = [-3.6035e+50-1.0331e+35i 3.2541e+21+6.1677e+19i -5.1763e+20-2.5318e+20i -2.3565e+19 0 7.2761e+18;0.12558-861490000000000i -2.5881-0.024521i 0.24839-1.0585i -0.99606 0 0.86678;-2.1361e+49+4.8846e+64i -1.2606e+21-3.7042e+19i -6.8697e+19+1.0156e+20i 0 0 7.1063e+48+2.0718e+33i;-1.513e+17+1.038e+33i -215730-6339i -7837.5+11586i 0 0.0050625-77900000000000i -1.5087e+17-9.9402e-15i;2.1361e+59-4.8846e+74i 1.2606e+31+3.7042e+29i 6.8697e+29-1.0156e+30i 0 0.00021977-3.0093e-36i -7.1063e+58-2.0718e+43i]

In in Maple,

M := Matrix(5,6, [[-0.36035e51-0.10331e36*I, 0.32541e22+0.61677e20*I, -0.51763e21-0.25318e21*I, -0.23565e20, 0, 0.72761e19], [.12558-0.8614900000e15*I, -2.5881-0.24521e-1*I, .24839-1.0585*I, -.99606, 0, .86678], [-0.21361e50+0.48846e65*I, -0.12606e22-0.37042e20*I, -0.68697e20+0.10156e21*I, 0, 0, 0.71063e49+0.20718e34*I], [-0.1513e18+0.1038e34*I, -215730-6339*I, -7837.5+11586.*I, 0, 0.50625e-2-0.7790000000e14*I, -0.15087e18-0.99402e-14*I], [0.21361e60-0.48846e75*I, 0.12606e32+0.37042e30*I, 0.68697e30-0.10156e31*I, 0, 0.21977e-3-0.30093e-35*I, -0.71063e59-0.20718e44*I]])

Sign in to comment.

Answers (0)

Categories

Find more on Performance and Memory in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!