Author |
Topic |
|
zeeffe
Switzerland
4 Posts |
Posted - 11/03/2010 : 4:14:14 PM
|
Hello,Guys, could somebody help me of several problems about my script?
1. How to generate the mean value of the double values in the same row at the range of [2:x] (X>2, variable)?
2. When I use "win -t plot;" to creat a graph layer, can I specify this new layer go to a new subfold in the project explorer?
3. How can I specify the line width of the ploted line when I use "plotxy plot:=200" to plot?
Thank you very much for the help in advance!
Origin Ver. 8.5 and Service Release (Select Help-->About Origin): Operating System: |
|
zeeffe
Switzerland
4 Posts |
Posted - 11/03/2010 : 6:39:28 PM
|
another question, sorry for so many questions
4. After using the following script to fit my data, I can not get the "nlsf.P3", and the resulting plot graph doesn't show the right Horizontal-vertical scale. How can I specify the scale in the script?
range Draw1=1!(logc, Act); nlsf.Init(); nlsf.PasteToPlot = 1; nlsf.Func$ = "boltzmann"; nlsf.FitData$ = Draw1; NLSF.P1 = 100; NLSF.P2 = 0; NLSF.P3 = -4; NLSF.P4 = 1; NLSF.V1 = 0; // fix parameter 1 NLSF.V2 = 0; // fix parameter 2 nlsf.Execute("parainit"); // estimate parameters nlsf.Fit(400);
DATA: Act logc 16.9476 1 17.19911 0.69897 26.27562 0.39794 31.82294 0.09691 42.42367 -0.20412 53.4012 -0.50515 |
|
|
larry_lan
China
Posts |
Posted - 11/04/2010 : 04:57:27 AM
|
1.
In the first line of your script, you defined
range Draw1=1!(logc, Act)
While in your sample dataset, it's
Act logc
Which one is X and which one is Y?
2.
NLSF is an old object in Origin 7.5. We don't suggest user use that in Origin 8. Please change your script by using nlbegin X-Functions to perform fitting.
If you still want to use NLSF object, please specifies data by dataset notation instead of range variable.
Besides, to rescale the graph, use the layer -a command.
Your script can be changed into:
nlsf.Init(); nlsf.PasteToPlot = 1; nlsf.Func$ = "boltzmann"; nlsf.FitData$ = %(%h, logc); NLSF.P1 = 100; NLSF.P2 = 0; NLSF.P3 = -4; NLSF.P4 = 1; NLSF.V1 = 0; NLSF.V2 = 0; nlsf.Execute("parainit"); nlsf.Fit(400); layer -a;
Thanks Larry OriginLab |
Edited by - larry_lan on 11/04/2010 04:58:37 AM |
|
|
VincentLiu
China
Posts |
Posted - 11/04/2010 : 05:22:49 AM
|
To the 1st question: You could first define a range variable and then use the stats function to get the mean.
range aa = [Book1]Sheet1!col(a)[1]:col(d)[1]; stats aa; stats.mean =
Or you could use the rowstats to get the mean of a row or part of a row.
dataset mymean; rowstats irng:=[Book1]Sheet1!col(1)[1]:col(e)[1] mean:=mymean sd:=<optional>; mymean =
To the 2nd question: You could first create a graph and then use the pe_move function to move the graph to other folder.
pe_move move:=Graph1 path:=/Folder2;
To the 3rd question: You need to use the Set command to change the width of the plot. You can go to this page to get an example to know how to do this.
Vincent OriginLab Technical Services
|
Edited by - VincentLiu on 11/04/2010 06:00:46 AM |
|
|
zeeffe
Switzerland
4 Posts |
Posted - 11/04/2010 : 6:29:53 PM
|
as you suggested, but the following script doesn't work, Could you help to check what mistake I had make?
range Draw1=1!(logc, Act) nlbegin iy:=Draw1 func:=boltzmann nltree:=ttt init:=enable; ttt.p1=100; ttt.f1=1; ttt.p2=0; ttt.f2=1;
ttt.maxiter=400; nlfit; nlend;
quote: Originally posted by larry_lan
1.
In the first line of your script, you defined
range Draw1=1!(logc, Act)
While in your sample dataset, it's
Act logc
Which one is X and which one is Y?
2.
NLSF is an old object in Origin 7.5. We don't suggest user use that in Origin 8. Please change your script by using nlbegin X-Functions to perform fitting.
If you still want to use NLSF object, please specifies data by dataset notation instead of range variable.
Besides, to rescale the graph, use the layer -a command.
Your script can be changed into:
nlsf.Init(); nlsf.PasteToPlot = 1; nlsf.Func$ = "boltzmann"; nlsf.FitData$ = %(%h, logc); NLSF.P1 = 100; NLSF.P2 = 0; NLSF.P3 = -4; NLSF.P4 = 1; NLSF.V1 = 0; NLSF.V2 = 0; nlsf.Execute("parainit"); nlsf.Fit(400); layer -a;
Thanks Larry OriginLab
|
Edited by - zeeffe on 11/05/2010 4:46:16 PM |
|
|
zeeffe
Switzerland
4 Posts |
Posted - 11/05/2010 : 5:04:54 PM
|
With pe_move function seems doesn't work, with the following script, the can't move result always pop up.
pe_move move:=MR3C_1, path:=/plot;
(MR3C_1 is my graph, 'plot' is the name of the folder under /)
quote: Originally posted by VincentLiu
To the 1st question: You could first define a range variable and then use the stats function to get the mean.
range aa = [Book1]Sheet1!col(a)[1]:col(d)[1]; stats aa; stats.mean =
Or you could use the rowstats to get the mean of a row or part of a row.
dataset mymean; rowstats irng:=[Book1]Sheet1!col(1)[1]:col(e)[1] mean:=mymean sd:=<optional>; mymean =
To the 2nd question: You could first create a graph and then use the pe_move function to move the graph to other folder.
pe_move move:=Graph1 path:=/Folder2;
To the 3rd question: You need to use the Set command to change the width of the plot. You can go to this page to get an example to know how to do this.
Vincent OriginLab Technical Services
|
|
|
greg
USA
1379 Posts |
Posted - 11/10/2010 : 11:10:31 AM
|
The specified graph is probably an embedded graph - perhaps the result of a fit. Even if you are viewing the embedded graph outside its container, you cannot move it. |
|
|
|
Topic |
|