Got adain interested in a book LINEAR ALGEBRA with APLICATIONS, very nice book, very early there are exercises to show the corresponding matrix of coeffients. Trivial, if one types by reading the ckeeficients to bild the riws Matrix needs. But now my question : How to generate thebmatrix by a def ....
ok lhs and rhs of an Eq is easy, using args too . But what dimyoundo if there are equations with differen numbers of say x_i. Missing unknows have to create an 0 at the needed row.index.
I translated an equation (lhs) with srepr with regular expression , replacing Symbol ('x1) to 1 etc .
Questions , how would you trans form e.g x1 + x3 - 2*x5 To
1 0 1 0 -2 ?
Ok, I extract x1 x3 and x5 ==>!knowing now x2 and x4 is missing, knowing the 0 at index 1 and 3 (zero order of Python) ...
Have to learn to give code examples here ... Pictutes ?
Newbie in this groep
Ideas and help very much apteciated 😉 , by the way i am an 祖父 is grandpa