[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fitting equation system for triangular matrix

From: Pavel Hofman
Subject: Re: Fitting equation system for triangular matrix
Date: Sun, 2 Oct 2022 14:34:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

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

Best regards,


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]