View previous topic :: View next topic |
Author |
Message |
wim
Joined: 22 Jul 2011 Posts: 4 Location: Wuerzburg, Bavaria, Germany
|
Posted: Fri Jul 22, 2011 8:21 am Post subject: Getting first x value of a curve |
|
|
Hello,
just to introduce my self:
my name ist wim (short for jan-willem) and i am from germany. i startet to use dplot in my diploma thesis. please apologize my english, i try to give my best.
I have one question. Is there a macro function to get the first x-value of a curve. My recordings have an offset on the x values and i want to let all the curves beginn at 0.
Tank you for your help.
wim |
|
Back to top |
|
|
jsc
Joined: 02 Dec 2005 Posts: 222
|
Posted: Fri Jul 22, 2011 9:24 am Post subject: |
|
|
$X(i,j)
X value of the j'th point of the i'th curve. Only meaningful for XY plots. For example, $X(3,12) will be replaced with the X value of the 12th point from the 3rd curve.
$XMIN
Minimum X value. Ignored for box-and-whisker plots and dot graphs.
$XMAX
Maximum X value. Ignored for box-and-whisker plots and dot graphs
These are text placeholders. Similar commands are available in the macro language. |
|
Back to top |
|
|
wim
Joined: 22 Jul 2011 Posts: 4 Location: Wuerzburg, Bavaria, Germany
|
Posted: Mon Jul 25, 2011 2:13 am Post subject: |
|
|
Hey js,
thank you for your fast answer. I just hat the time to test ist.
So this is my little macro...or the part that is nocht working:
---
Directory("(changes from test to test")
FileType(4)
ForFilesIn("*.txt")
SelectCurve(3)
Color(3,255,0,255)
EditOperateY("y/10")
SelectCurve(-1)
EditOperateX("X/1000")
EditOperateX("X-$X(1,1)")
FileSaveAs(1,"...")
FileClose()
NextFile
--
So i get the message for "EditOperateX("X-$X(1,1)"" that i have to use an operator before open parenthesis...
i dont get the problem...sorry for that. I did not find any information aboutn the $X(1,1) command in the dplot help.
All I want to do is, take the first x value of the first xy curve (btw. there is one x for all curves...) and operate with it.
I just found out that the $XMin command ist working. But takes the min for ervery curve. So i want the macro to take the minimum of the first curve for all of the others.
and what am i doing wrong with the $X(i,j) command?
Thank you for your help.
wim |
|
Back to top |
|
|
jsc
Joined: 02 Dec 2005 Posts: 222
|
Posted: Mon Jul 25, 2011 7:17 am Post subject: |
|
|
The central part of your macro works for me, including EditOperateX("X-$X(1,1)"). I think the error is with the Directory command - if you really typed it as shown, the unbalanced parenthesis in the first line may be the problem. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|