| T O P I C R E V I E W |
| rrahul |
Posted - 07/19/2005 : 5:06:16 PM Origin Version (Select Help-->About Origin): 7.0 Operating System: Win XP
Hi, I am fitting multiple data sets to Exp decay. I was hoping to save the fitting parameters from all the fits to a single file where each column will give me each of the parameters for fits performed.
I have included the code for reference. Thanks, Rahul
[Main] FDLOG.multiopen.colview=12; FDLOG.UseGroup(Ascii); //Open ASCII files if (FDLOG.multiopen()==0/0) return 1;
loop(ii,1,FDlog.MultiOpen.Count) { FDlog.Get(A, ii); win -t data; open -w %A; %W= %H; win -ch 1; // wks.colsel(2,1); run.section(, Plot, %W); run.section(Fit,EXPDECAY1); } [Plot]
win -t plot Scatter G%W; layer -i %W_b 0201 201; layer -a; layer.x.from = 0; label -xb "Time(s)"; label -s -p 75 50 -n label1 G%W; label1.fsize = 22; // change font size for label1 return 0; |
| 4 L A T E S T R E P L I E S (Newest First) |
| rrahul |
Posted - 07/20/2005 : 1:41:05 PM Hi Mike, With the SR4 version, Multifit complies and Labtalk code runs perfectly. Thanks a lot for help. -rahul |
| Mike Buess |
Posted - 07/20/2005 : 12:51:07 PM Hi Rahul,
Line 443 uses the LabTalk.object feature that was introduced in a service release. I don't remember which SR so I suggest you update to the latest... SR4.
...You can stop the compiler error with SR2 but I still recommend SR4. http://www.originlab.com/index.aspx?s=9&ID=918&language=all&lm=144
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 07/20/2005 1:08:44 PM |
| rrahul |
Posted - 07/20/2005 : 12:38:20 PM Hi Mike, Thanks for the tip. But I can't seem to get the multifit add on to compile. It is giving compilation errors listed below:
compiling... MultiFit.c C:\Program Files\OriginLab\Origin7\OriginC\MultiFit.c(443) :Error, Variable "" not declared C:\Program Files\OriginLab\Origin7\OriginC\MultiFit.c(443) :Error, general compile error C:\Program Files\OriginLab\Origin7\OriginC\MultiFit.c(441) :Error, error(s) found in compiling function mfCreateOutputWks
Could I be doing something wrong? or is it a bug? -rahul |
| Mike Buess |
Posted - 07/19/2005 : 8:53:53 PM The MultiFit add-on on the File Exchange should do what you want. Use the function mf2wks like this...
[Main] FDLOG.multiopen.colview=12; FDLOG.UseGroup(Ascii); //Open ASCII files if (FDLOG.multiopen()==0/0) return 1;
%O=FitParam; // name of parameter wks (MultiFit will create the wks) loop(ii,1,FDlog.MultiOpen.Count) { FDlog.Get(A, ii); win -t data; open -w %A;
%W= %H;
win -ch 1; // wks.colsel(2,1); run.section(, Plot, %W); run.section(Fit,EXPDECAY1); mf2wks %O; // copy parameters to wks }
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 07/20/2005 07:29:44 AM
Edited by - Mike Buess on 07/20/2005 10:29:09 AM |
|
|