Date: Jan 31, 2013 9:47 AM
Author: Steven Lord
Subject: Re: How to get the co-ordinate values from a graph automatically.
"Ansuman Mahapatra" <email@example.com> wrote in message
> I have a roughly Gaussian dataset & I use curve fitting to fit that data
> to a Gaussian curve using "fit(xx',n1(4,:)','gauss2')". Problem is that I
> want to know each data points in that fitted curve without clicking on the
> graph or plotting it on a graph.
> Please help me in getting the values.
Just evaluate the fit at your desired points.
>> load census;
>> curve = fit(cdate, pop, 'poly2')
Linear model Poly2:
curve(x) = p1*x^2 + p2*x + p3
Coefficients (with 95% confidence bounds):
p1 = 0.006541 (0.006124, 0.006958)
p2 = -23.51 (-25.09, -21.93)
p3 = 2.113e+04 (1.964e+04, 2.262e+04)
>> [cdate pop curve(cdate)]
*snip the rest of the table*
To contact Technical Support use the Contact Us link on