T O P I C R E V I E W |
Stéphane |
Posted - 06/06/2007 : 04:19:38 AM Origin Version (Select Help-->About Origin): 7.5 Operating System: xp
Hi!
I have datas in a graph and want to fit them by clicking on a button on the graph, so that the fitted datas will be saved in an existant worksheet and not in a new "polyfitxxx-worksheet". How may I write this in the "Label control" of the button? The goal is that the following of the programm works (links on worksheets) without that the user has to rename the created fits. Is it possible to use/call the NLSF-tool in that way?
Thanks for your help! Stéphane |
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 06/06/2007 : 11:27:46 AM Hi Stephane,
quote: Is it possible to use/call the NLSF-tool in that way?
Yes it is, but it sounds like you've been using Analysis > Fit Polynomial which uses the STAT object rather than NLSF. Seems like it would be much easier to save your curve fits to separate PolyFitn worksheets as you have been doing and then collect all PolyFit worksheets to a single results worksheet. That can be done by assigning the following script to the Custom Routine button as described here.
%A=""; if( exist(PRWks$,4) ) %A=PRWks$; getn ( ) %%A (Enter name of results worksheet); if( !exist(%A,2) ) { win -n W %A; PRWks$ = %A; }; win -a %A; wks.joinmode=0; doc -e W { if("%[%H,8]"=="PolyFit") { %A!wks.join(%H); win -cd %H; }; };
If you really want to program the whole process look at the [FitPolynomial] section of PR.OGS which runs when you select Fit Polynomial. See also the example in the Programming Guide (Help: Programming: LabTalk Language Reference: Object Reference: Alphabetical List of Objects: Stat).
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 06/06/2007 12:01:33 PM |
|
|