help-octave
[Top][All Lists]
Advanced

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

## Re: Problem of polyfit

 From: Fredrik Lingvall Subject: Re: Problem of polyfit Date: Fri, 07 Oct 2005 10:32:47 +0200 User-agent: Mozilla Thunderbird 1.0.6 (X11/20051004)

```Tetsuro KURITA wrote:

```
```
```
Also following two equations do not return same results, when calculating data I posted.
```
p = inv(X'*X)*(X'*y);

p = (X'*X)\(X'*y);

```
In the case of data I posted, first equation give better results. It looks that the operator "\" have a certain limitation. What is that ?
```
Can you post the output of  norm( inv(X'*X)*X'*y - (X'*X)\X'*y )?

A simple test on my machine:

octave:26> X=randn(100,100);
octave:27> y=randn(100,1);
octave:28> norm( inv(X'*X)*X'*y - (X'*X)\X'*y )
ans =  3.7190e-13

Fredrik

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```

reply via email to

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