Prev: p-values
Next: Data Mining
From: Nicholas on 15 Apr 2010 12:00 Hi all, I'm using cftool to rapid-fire fit a large number of curves (~30-50) to exponentials with 3 to 5 fitparameters (Rate, amp, asymptote, etc.) I'm looking for a quick way to output the fit parameters for all 50 or so fits I have in cftool to a text file. I know about saving to workspace, but that appears to form some matlab contruct from which I don't know how to easily export the parameters. I'm just looking for something that will lump all the fits into a x by y array, where x is the total number of fits I have and y is the number of fit parameters, that I can then just copy to excel. Does anyone know a convenient way to do this, other then the error-prone manual copying I've been doing? Thanks! -Nick
From: Steven Lord on 15 Apr 2010 12:12 "Nicholas " <nicholas_last1(a)yahoo.com> wrote in message news:hq7d6o$epm$1(a)fred.mathworks.com... > Hi all, > > I'm using cftool to rapid-fire fit a large number of curves (~30-50) to > exponentials with 3 to 5 fitparameters (Rate, amp, asymptote, etc.) I'm > looking for a quick way to output the fit parameters for all 50 or so fits > I have in cftool to a text file. I know about saving to workspace, but > that appears to form some matlab contruct from which I don't know how to > easily export the parameters. I'm just looking for something that will > lump all the fits into a x by y array, where x is the total number of fits > I have and y is the number of fit parameters, that I can then just copy to > excel. Does anyone know a convenient way to do this, other then the > error-prone manual copying I've been doing? Thanks! In what format do you want the fit to appear in Excel? Look at the METHODS available for the fit object that you receive when you export the fit to the workspace (or that is created by the file you create using the File -> Create M-File menu item.) http://www.mathworks.com/access/helpdesk/help/toolbox/curvefit/bqxoya6.html http://www.mathworks.com/access/helpdesk/help/toolbox/curvefit/f2-17602.html#bqxawgm-1 I believe some of the *NAMES, *VALUES, and/or FORMULA methods will be of use in constructing the string that you want to copy to Excel to represent the fit. Alternately, if you're copying the fits to Excel for storage, you could simply save the fit object in a MAT-file and load it into MATLAB later to view or reuse it. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Nicholas on 15 Apr 2010 12:26 Thanks. coeffvalues may do the trick. In order to use it, it appears that I have to save each fit individualy to the workspace. If I select multiple curves the save to workspace option is greyed out. Is there a way to save en masse, or a way that coeffvalues can directly access the cftool fits without saving to workspace? It's not too big a deal, as going through and clicking save to workspace for them all isn't too bad.
From: Steven Lord on 15 Apr 2010 13:33 "Nicholas " <nicholas_last1(a)yahoo.com> wrote in message news:hq7ems$9ie$1(a)fred.mathworks.com... > Thanks. coeffvalues may do the trick. In order to use it, it appears > that I have to save each fit individualy to the workspace. If I select > multiple curves the save to workspace option is greyed out. Is there a > way to save en masse, or a way that coeffvalues can directly access the > cftool fits without saving to workspace? It's not too big a deal, as > going through and clicking save to workspace for them all isn't too bad. If the fits are all the same (but on different data) you could try generating an M-file from the first fit you perform in CFTOOL then using that function to perform the later fits (looping over the collection of data sets) and returning the fit object (or just the coefficient values) from that function. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
From: Nicholas on 15 Apr 2010 13:52 "Steven Lord" <slord(a)mathworks.com> wrote in message <hq7il0$bgm$1(a)fred.mathworks.com>... > > If the fits are all the same (but on different data) you could try > generating an M-file from the first fit you perform in CFTOOL then using > that function to perform the later fits (looping over the collection of data > sets) and returning the fit object (or just the coefficient values) from > that function. > > -- > Steve Lord > slord(a)mathworks.com > comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ > Thanks again. I think I've got it working.
|
Pages: 1 Prev: p-values Next: Data Mining |