```Date: Feb 6, 2012 12:55 PM
Author: Marzieh
Subject: Re: get fit coefficients from fitting result

Hello,Does anyone know how can I save a set of coefficients for different values of k for example.I have k=0.00475 and do the fitting,using coeffvalues I  get 'g' as a 1 by 2 matrix 0.002  0.63, then I want to have it for k ranging from 0 to 0.008 with step size 0.001;I put it in a loop but it did not work!K=0.0:0.001:0.0008;  for iK=1:length(KK),    K=KK(iK)    modelNEURON_excitatory;    name=strcat('g_modelNEURON_excitatory_K',num2str(K),'.mat');    save(name,'g','-mat');endThanks,"Steven Lord" <slord@mathworks.com> wrote in message <bkf9mn\$9g8\$1@ginger.mathworks.com>...> Ben Timney wrote:> > This is probably really simple, but does anybody know how to get the> > fit coefficient values from the fit result object created by the> > curve fitting toolbox?> > Use COEFFVALUES.> > >> fittedmodel1> fittedmodel1 =>      Linear model Poly2:>        fittedmodel1(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+004  (1.964e+004, 2.262e+004)> >> coeffvalues(fittedmodel1)> ans =>        0.00654113049422132         -23.5097459954293> 21129.5921192366> > *snip*> > -- > Steve Lord> slord@mathworks.com> >
```