Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: nlinfit
Replies: 1   Last Post: Mar 11, 2013 3:54 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Tom Lane

Posts: 858
Registered: 12/7/04
Re: nlinfit
Posted: Mar 11, 2013 3:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

>> > function f=order1(a,x1,x2)
>> > f=(a(1)*x1)+((a(2)*a(3)*x1)/(1+a(3)*x1+a(4)*x2));

> I did that but now I'm getting this error:
> ??? Error using ==> nlinfit at 127
> MODELFUN should return a vector of fitted values the same length as Y.

I suspect you want elementwise division using "./" instead of "/" for matrix

-- Tom

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2016. All Rights Reserved.