[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## fit [y1,y2]=f(x) to data

**From**: |
Martijn Brouwer |

**Subject**: |
fit [y1,y2]=f(x) to data |

**Date**: |
Mon, 16 Jun 2003 17:39:30 +0200 |

I have a lot of data that consist of one independent (x) and two dependent
variables (y1 and y2), and would like to fit a suitable function to these.
x=Nx1 vector. I create a vector y=[y1,y2] size Nx2, and use these as parameters
for the leasqr routine. When I try to run my program leasqr complains:
error: input(x)/output(y) data must have same number of rows
which is incorrect. The error is caused by the following line in leasqr.m:
y=y(:); wt=wt(:); pin=pin(:); dp=dp(:); %change all vectors to columns
So leasqr is not designed to fit this kind of data. How do I have to deal with
this problem? Can leasqr fit complex data?
Kind regards,
Martijn Brouwer
-------------------------------------------------------------
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
-------------------------------------------------------------