calca

Open full view…

Getting single values out of solution of equation

pietvo
Sun, 24 Feb 2019 22:23:58 GMT

Is it possible to get the individual values out of a solution of an equation? Like in the examples of linear equations: 12x + 13y = 163 -2x + 100y = 688 We can solve for x and y by taking the constants on the left hand side and putting them in a matrix: a = [12, 13; -2, 100] and by putting the right hand side into a vector: b = [163; 688] Now we can convert our two equations into one and solve for x and y: a * xy = b xy => [6; 7] Now I would get x = 6 and y = 7, without copy/paste. With copy/paste you have to redo it when you change the equation above. xy here looks like a matrix (column vector), but x = xy[0] does not set x to 6. Is there some hidden or secret way to do it?