I have this line of code: a/b
I am using these inputs: a=[1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9]
b=ones(25,18)
this is the result: [5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], a 1x25 matrix.
what is matlab doing? I am trying to duplicate this behavior in Python, and the mrdivide documentation in matlab was unhelpful. where does the 5 come from, and why are the rest of the values 0? I have tried this with other inputs and receive similar results, usually just a different first element and zeros filling the remainder of the matrix. In python when I use linalg.lstsq(b.T,a.T), all of the values in the first matrix returned (i.e. not the singular one) are 0.2. I have already tried right division in python and it gives something completely off with the wrong dimensions.
I understand what a least square approx. is, I just need to know what mrdivide is doing.