FunctionOfXY1Y2 Syntax

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

Moderator: DPlotAdmin

Post Reply
jsc
Posts: 222
Joined: Fri Dec 02, 2005 8:56 am

FunctionOfXY1Y2 Syntax

Post by jsc »

David,
Can I do this with the "$XMAX"?:

FunctionOfXY1Y2("sum(Y4)",0,$XMAX,0.5)

The $XMAX seems to be ignored, as well as the "0", but the command runs, but from the full extents of the data.

I have a feeling I can't use the text placeholders here...
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

There's a bug here but I haven't isolated it yet. It has something to do with the fairly recent edition of allowing you to specify that the output should use the X values from a specified curve rather than specified start/stop/interval values.

No, no, no, wait... I'm wrong. There's no bug. Of course there isn't :D

You need to preface the FunctionOfXY1Y2 command with

FXY1Y2_XFrom(0,0)

... and your $XMAX should actually be =$XMAX (note the leading equals sign).

I definitely need to add more verbiage to the FunctionOfXY1Y2 command Help, so... thanks, as usual.
Visualize Your Data
support@dplot.com
jsc
Posts: 222
Joined: Fri Dec 02, 2005 8:56 am

Post by jsc »

I was hoping you were watching!

0,0 is state and index I just read. With state=0, then index is ignored and Function of XY1Y2 does what I want, you're saying...

FXY1Y2_XFrom(0,0)
FunctionOfXY1Y2("function",0,=$XMAX,dX)

Thanks. Worked great! (but I did miss that FXY1Y2_XFrom entirely...)
jsc
Posts: 222
Joined: Fri Dec 02, 2005 8:56 am

Post by jsc »

FunctionOfXY1Y2("if(Y1>10,0,(-17.18195+0.322074*Y2+-4.439167e-005*Y2^2)/120)",0,=$XMAX,0.5)

You see that "+-" after the first Y2? Crashed DPlot immediately. Window dropped out so fast it was amazing!

I guess you can't do that!
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Thanks. I need to add "+-" to the preprocessing and replace with, of course, "-".
Visualize Your Data
support@dplot.com
Post Reply