Re: Fitting equation system for triangular matrix

Pavel Hofman <[email protected]> Sun, 2 Oct 2022 14:34:59 +0200
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
Hi Matthias,

I have been always served very well by functions in the optim package. 
In my case I always had nonlinear equations only (harmonic functions), 
nonlin_curvefit behaved very well for me. There are functions for linear 
regression too https://octave.sourceforge.io/optim/overview.html

Best regards,

Pavel.

Dne 02. 10. 22 v 13:32 Matthias Brennwald napsal(a):
> 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?
> 
> 
> ----------
> We are transitioning to a web based forum
> for community help discussions at
> https://octave.discourse.group/c/help



----------
We are transitioning to a web based forum
for community help discussions at
https://octave.discourse.group/c/help