+ 2

Gaussian elimination method

I'm trying solve many system by matrices. I would like to write a code to solve this, but i don't know even how to start. I found this link: https://goo.gl/zRmH9m, it seems what i'm trying to do, but this code don't work for me. There aren't input and I don't know how to write my matrice in this. | a11 a12 a13 ... a1n | | a21 a22 a23 ... a2n | | ... ... ... ... ... | | an1 ... an3 ... ann | transform into matrice: | a11 a12 a13 ... a1n | | 0 a22 a23 ... a2n | | ... ... ... ... ... | | 0 0 0 ... ann | I would like to advise that it's not my homework. If you would like to check, i was doing this by handly. See here: https://ibb.co/f3rSKo

27th Jun 2018, 8:53 PM
▲TopGun ▲
▲TopGun ▲ - avatar
11 odpowiedzi
+ 7
Do you have your own attempt somewhere? Because the answer in the link you provided seems to be working for me...
28th Jun 2018, 4:26 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
Numerical analysis my most hated subject...but at the same time extremely useful.
28th Jun 2018, 7:06 PM
Haris
Haris - avatar
+ 5
Can you save your code in the playground and post a link here?
4th Jul 2018, 5:45 AM
David Ashton
David Ashton - avatar
+ 4
raphaelrequigo Sorry for not being able to help before, now I have more time. So to be on the same page what method you need to use? (there are several methods with gauss's name e.g. gauss-jordan, l - u gauss etc ) Simple gauss : https://youtu.be/eDb6iugi6Uk Wiki on Gaussian elimination method (see pseudo code section): https://en.m.wikipedia.org/wiki/Gaussian_elimination See also: https://en.m.wikipedia.org/wiki/LU_decomposition
5th Jul 2018, 9:23 AM
Haris
Haris - avatar
+ 3
raphaelrequigo Make a 4 x 5 2d array and insert those values.
2nd Jul 2018, 6:05 PM
Haris
Haris - avatar
+ 2
Hello Haris! Thanks for your help. But I don't know how to do it. If I press Ctrl+Enter to skip the line and make a21 (second line first column), it still don't work. I've published my second attempt. Now the code don't give an error answer, but still don't give me right answer. https://code.sololearn.com/WsH6sKJSbbcA/?ref=app
2nd Jul 2018, 6:20 PM
▲TopGun ▲
▲TopGun ▲ - avatar
+ 2
David Ashton https://code.sololearn.com/cMNR6v6h1Qog/?ref=app I havent sure if willwork at SoloLearn. But in my computer works, despite of I dont know how to insert data.
4th Jul 2018, 5:59 PM
▲TopGun ▲
▲TopGun ▲ - avatar
28th Jun 2018, 4:05 PM
▲TopGun ▲
▲TopGun ▲ - avatar
+ 1
Kuba Siekierzyński Thank you for your attention. I don't know how to insert my input, maybe because this aren't working. See here, the code don't work for any changes: https://ibb.co/eGDFhJ. I want input this matrice: 4x5 2 2 1 1 7 1 -1 -2 -1 1 3 2 -3 -2 4 4 3 2 1 12 https://code.sololearn.com/WsH6sKJSbbcA/?ref=app
2nd Jul 2018, 5:58 PM
▲TopGun ▲
▲TopGun ▲ - avatar
+ 1
David Ashton Could you help me, please ?
3rd Jul 2018, 6:58 PM
▲TopGun ▲
▲TopGun ▲ - avatar
+ 1
Thank you Haris and everyone who keep trying help me. Haris, If was possible write and use my code in all of these methods, I would be very thankful. But if just one works, I also will be very thankful. I dont know coding in Python enough to write a code alone. Because this I've looked for a ready code at SOF Any method working, will be very Helpful; Gauss elimination, Gauss-Jacobi,, LU Factoration, or any other. This code (above) looks good, but I don't know how to input my matrice.
6th Jul 2018, 1:48 AM
▲TopGun ▲
▲TopGun ▲ - avatar