Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2!postnews.google.com!v16g2000prc.googlegroups.com!not-for-mail
From: dcorrea <david.correa@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: curve fitting
Date: Mon, 3 Nov 2008 05:22:00 -0800 (PST)
Organization: http://groups.google.com
Lines: 32
Message-ID: <f5ab4c87-65da-4dfa-aa4f-196f220acfd4@v16g2000prc.googlegroups.com>
References: <gemldt$oq2$1@fred.mathworks.com>
NNTP-Posting-Host: 134.157.178.78
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1225718521 8178 127.0.0.1 (3 Nov 2008 13:22:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 3 Nov 2008 13:22:01 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v16g2000prc.googlegroups.com; posting-host=134.157.178.78; 
	posting-account=SDToZwoAAAAnN_L6GH6ilE6wsubVt-vp
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 
	Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 
	2.0.50727),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:498622



Hello

Can you try to use CURVE FITTING Tool (Interface Graphic)

>> cftool

Greetings
David C.



On Nov 3, 5:57=A0am, "Mohammad Monfared" <gohardo...@gmail.com> wrote:
> Hi everybody,
> I'm trying to fit a curve of a custom equation to my data using matlab, b=
ut I can't get any answer. Could anyone suggests where is the problem.
>
> x1=3D[0 2 50 106 250 500 1000 2000];
> y1=3D[0 0.03 0.17 0.279 0.735 0.921 0.994 1.002];
> s =3D fitoptions('Method','NonlinearLeastSquares',...
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'Lower',[0,0,0,0],...
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'Upper',[1000,10,10,10],...
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'Startpoint',[100,2,1,1]);
> fredfitype=3Dfittype('(1/log(exp(1)+(ag/x)^ng)^mg)*(1-(log(1+(dg)/x)/log(=
1+dg=AD)))^7','options',s);
> [c0] =3D fit(x1,y1,fredfitype);
>
> I know from SPSS software that the answer is:
> ag=3D250 ; ng=3D2.944 ; mg=3D1.2 ; dg=3D3.059 ;
>
> thanks so much,