I am trying to fit a triangular matrix A to an equation system y = A*x, where x and y are two vectors of the same size.
If A would could be just any rectangular matrix, the following would work:
x = rand(10,1); y = rand(10,1); # some random vectors
A = y/x; # matrix such that y = A*x
However, I'd like A to be lower triangular, because the physics behind my problem dictate this. The coefficients in A should be such that A solves y = A*x in a least-squares sense. I suspect this is really a basic linear-algebra question, but I am not sure. How do I do that in Octave?