|
From: | Laurent Hoeltgen |
Subject: | Re: Matrix left division in .oct file |
Date: | Sun, 22 Feb 2015 11:07:03 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Am 21.02.2015 um 19:52 schrieb babelproofreader:
I'd like to code the Octave code below ( X is a matrix, y a vector ) w = ( ( X' * X ) \ X' ) * y ; in a .oct file, but my standard reference for things C++/.oct at http://wiki.octave.org/Tips_and_tricks doesn't say how to do this. Any hints? -- View this message in context: http://octave.1599824.n4.nabble.com/Matrix-left-division-in-oct-file-tp4668745.html Sent from the Octave - General mailing list archive at Nabble.com. _______________________________________________ Help-octave mailing list address@hidden https://lists.gnu.org/mailman/listinfo/help-octave
Hi,are you trying to solve a linear least squares problem? I'm pretty sure that octave has more efficient ways to handle this task than to compute ( X' * X ) \ X'. Especially if X is large and a full matrix, then this computation will be pretty expensive.
Regards, Laurent
[Prev in Thread] | Current Thread | [Next in Thread] |