Abtract DEADLINE Need Help
- From: "Aisha Hunte" <a_k_hunte@xxxxxxxxx>
- Date: Wed, 31 Oct 2007 16:33:56 +0000 (UTC)
I am trying to use lsqnonlin
I am calling using
x=lsqnonlin(@myfun,X0,[],[],options,DataX,DataY);
If I use this objective function it runs just fine.
function F = myfun(C,X,Y)
%C- Guess
%X- XData
%Y- YData
A= C(1);
B= C(2);
D= C(3);
F = sqrt((A.*X) + (B.*Y)) - D;
I would like for F to be
F = sqrt((A.-X)^2 + (B.-Y)^2) - D;
However if I change the *'s in F to a +'s (or -'s) then I
the following error
??? Error using ==> optim\private\lsqncommon
User supplied function failed with the following error:
Error: File: C:\Documents and Settings\Inquizitive\My
Documents\bps\myfun.m Line: 10 Column: 14
Missing variable or function.
If I leave the * in F and ^2's I get the following error
??? Error using ==> optim\private\lsqncommon
User supplied function failed with the following error:
Error using ==> mpower
Matrix must be square.
Why don't lsqnonlin tolerate addition or subtraction? Or
exponents?
.
- Follow-Ups:
- Re: Abtract DEADLINE Need Help
- From: Aisha Hunte
- Re: Abtract DEADLINE Need Help
- From: Steven Lord
- Re: Abtract DEADLINE Need Help
- Prev by Date: Re: Generating unique numbers
- Next by Date: Problem with 2007b and databases
- Previous by thread: Error with im2frame-colormap
- Next by thread: Re: Abtract DEADLINE Need Help
- Index(es):
Relevant Pages
|