Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Using m code generated by curve fitting tool box
Date: Tue, 2 Dec 2008 05:41:01 +0000 (UTC)
Organization: Univ of Waikato
Lines: 2
Message-ID: <gh2hpd$av5$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228196461 11237 172.30.248.35 (2 Dec 2008 05:41:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 2 Dec 2008 05:41:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 743752
Xref: news.mathworks.com comp.soft-sys.matlab:504296


Hi, I need a big help to extract the information generated by the m-file generated by curve fitting tool box. I used "xdata" and "ydata" and fitted it into a sine wave using curve fitting tool box. I used "Sum of Sin functions" as type of fit and "a1*sin(b1*x+c1)" as type of sin functions. Then it generated a sine wave for me and I saved it as m-file. Now I am using it as the function of my main code to do the curvefitting. But I want to extract the values a1, b1 and c1 generated by that function(m-code). It is saved as "cf_" under the automatically generated variable of m code which I can see in the workspace but it is not in 1-D or 2-D array, rather it comes up with text meassage in the workspace (in the class field of workspace it is written "cfit" which is normally "double" for other variables) so I cannot store it in other variables for further processing using the codes in the program. Is it possible to extract that information? 
Also is there any command for sinusoidal fitting similar to "polyfit" or "poly3"(which are used for polynomials)?