Getting first x value of a curve

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
wim
Posts: 4
Joined: Fri Jul 22, 2011 8:14 am
Location: Wuerzburg, Bavaria, Germany

Getting first x value of a curve

Post by wim »

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
jsc
Posts: 222
Joined: Fri Dec 02, 2005 8:56 am

Post by jsc »

$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.
wim
Posts: 4
Joined: Fri Jul 22, 2011 8:14 am
Location: Wuerzburg, Bavaria, Germany

Post by wim »

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
jsc
Posts: 222
Joined: Fri Dec 02, 2005 8:56 am

Post by jsc »

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.
Post Reply