|
"mona " <iee2006@yahoo.com> wrote in message <hebpsa$hlk$1@fred.mathworks.com>...
> "Matt " <xys@whatever.com> wrote in message <hebgtg$8b3$1@fred.mathworks.com>...
> > "mona " <iee2006@yahoo.com> wrote in message <heb6a0$mjr$1@fred.mathworks.com>...
> > > Hi all
> > > I know that I can use polyfit to fit the polynamial like
> > > y=Ax^2+Bx+c
> > > but waht about the polynamial which I cant saperat x and y like
> > >
> > > Ax^2+Bxy+Cy^2+Dx+Ey+F=0
> > >
> > > can I use polyfit to fit it ?
> >
> > No. What's often does is to use svd() to find the vector
> >
> > v=[A;B;C;D;E;F]
> >
> > which is approximately in the null-space of the matrix
> >
> > M=[x(:).^2, x(:).*y(:), y(:).^2, x(:), y(:), ones(size(x(:)))]
>
>
> hello all
> I couden't get it; what I shoud us in svd() is it the data x,y ; could explain please
> thanks
> mona
[U,S,V]=svd(M,0);
v=V(:,end); %v=[A,B,C,D,E,F].'
|