DPlot

Author Message
bfennema

Joined: 23 Oct 2011
Posts: 7
Location: Bray, Ireland

 Posted: Sun Oct 23, 2011 8:33 am    Post subject: Subtracting 2 curves One of the things I need to do is to subtract two curves. They are both plotted against time. I tried F(X,Y1,Y2) As an example I am trying to subtract Y1:sin(x) Y2= 2* sin(x) + 10 I use Generate F(X,(y1-y2) and get the error message "too many parameters at X=0." I tried straight lines and with the same message and I tried excluding 0 from the start, with the same result. So I think I am doing something wrong, but cannot see what. Any ideas ? P.s. I also found the SubtractCurves macro - how do I execute this in DPlot ? Thanks for the help, Boris.

Joined: 24 Jun 2003
Posts: 2016
Location: Vicksburg, Mississippi

 Posted: Sun Oct 23, 2011 12:00 pm    Post subject: The function you want is simply Y1-Y2 (or Y2-Y1). SubtractCurves does exactly the same thing. To use it in a macro just type SubtractCurves(1,2) (or whatever curve indices are appropriate)._________________David Hyde support@dplot.com
bfennema

Joined: 23 Oct 2011
Posts: 7
Location: Bray, Ireland

 Posted: Mon Oct 24, 2011 3:58 am    Post subject: Worked as you said - I thought F(x) needed to be included in the syntax - my mistake. B._________________Best regards, Boris Fennema
dcl9000

Joined: 28 Mar 2011
Posts: 15

 Posted: Fri Jun 01, 2012 6:40 pm    Post subject: Y=f(X,Y1,Y2,...) works for the first 9 curves only! Hi! Is there a way to remove this 9 curves limit? I have 12 curves....

Joined: 24 Jun 2003
Posts: 2016
Location: Vicksburg, Mississippi

 Posted: Fri Jun 01, 2012 9:14 pm    Post subject: Sorry, no. That's a poor design decision on my part that I haven't worked around yet, but hope to sooner or later. If you want the nuts and bolts of it, the function parser I use (which is otherwise excellent) takes letters A-Z as variables - 1 character only. DPlot reserves A-K as constants (skipping E because that would be confusing) and substitutes the next 9 letters L-T for Y1 - Y9. X, Y, and Z are reserved for obvious reasons. That leaves U, V, W for Y10, Y11, Y12, which I could do easily enough. But I'd rather remove the 1-character limitation so that you could have Y1-Y._________________David Hyde support@dplot.com
jsc

Joined: 02 Dec 2005
Posts: 189

 Posted: Sat Jun 02, 2012 8:21 am    Post subject: Just to horn in, I'm bumping the 9 curve limit on one of the projects that I use DPlot for, so a few more curves would be nice! I'm shuffling curves to another plot, then adding them back to the mix. 2 or 3 more would be helpful. More than that, and I'm beyond MY limit to keep track of what I'm doing!
dcl9000

Joined: 28 Mar 2011
Posts: 15

 Posted: Fri Jun 08, 2012 12:43 pm    Post subject: Hope this limit can be removed soon..... Thanks!
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 5 Hours Page 1 of 1

 Jump to: Select a forum General----------------General discussionSuggestions/QuestionsBug Reports Programming----------------C, C++, C#FortranBasicExcelDelphi
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