Post Reply 
What do you think about this idea ?
12-05-2015, 02:42 PM (This post was last modified: 12-05-2015 05:31 PM by dg1969.)
Post: #1
What do you think about this idea ?
I just add this suggestion for improvement on tricider list:

The ability to plot families of curves inside the function APP.

For examples:

F1(X) : SIN({1,0.2,5}*X) => 3 curves in a single entry SIN(X) ; SIN(0.2*X) ; SIN(5*X)

F2(X) : X^{2*{1:2,0.5}} => 3 curves X^2; X^(2*1.5); X^(2*2)

F3(X) : {1,2}*X^2+{2,3}*X => 2 curves X^2+2*X; 2*X^2+3*X

F4(X) : [1,2]*X^2+[2,3]*X => 4 curves (1,2); (1,3); (2,2); (2,3)

mixed form ?

What could be the best syntax ?
Find all posts by this user
Quote this message in a reply
12-05-2015, 06:49 PM
Post: #2
RE: What do you think about this idea ?
Standard list processing would be used - so your F1 and F3. Introducing a new syntax wouldn't be such a great idea.

However, these are not the problem areas. The problem starts to happen when you have places where there are different numbers of curves/results in different places on the curve. For example, somewhere where you had this:

peicewise(x<2,{1,2,3}*X,SIN(-{1,2}))

Things like that can really throw the graphing engine for a loop and it is unclear exactly how best to handle it. Once we figure out how to do so the rest is pretty easy since automatic list processing already exists.

TW

Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
12-05-2015, 08:23 PM (This post was last modified: 12-05-2015 08:28 PM by dg1969.)
Post: #3
RE: What do you think about this idea ?
(12-05-2015 06:49 PM)Tim Wessman Wrote:  For example, somewhere where you had this:
peicewise(x<2,{1,2,3}*X,SIN(-{1,2}))

Thank Tim for your answer.

In this case can we interpret this way ?

piecewise(x<2,1*X,SIN(-1))

piecewise(x<2,2*X,SIN(-2))

piecewise(x<2,3*X,NAN) "not a number" as usual when the function is not defined ?

So three curves in a single input...

Perhaps did I misunderstood your example... For sure I certainly did not imagine some problematic situations... But at first this possibility could be offered in a number of clearly documented basic case ?
Find all posts by this user
Quote this message in a reply
12-06-2015, 05:13 PM
Post: #4
RE: What do you think about this idea ?
(12-05-2015 06:49 PM)Tim Wessman Wrote:  The problem starts to happen when you have places where there are different numbers of curves/results in different places on the curve. For example, somewhere where you had this:

peicewise(x<2,{1,2,3}*X,SIN(-{1,2}))

Things like that can really throw the graphing engine for a loop and it is unclear exactly how best to handle it. Once we figure out how to do so the rest is pretty easy since automatic list processing already exists.


How about simply require that all lists be the same length? Basically, do what is done in Home by generating an error message whenever they are not the same length. (Please, not like what is done in CAS where missing elements are sometimes treated as zero, {1,2,3}+{3,4}={4,6,3}, and sometimes ignored, {1,2,3}*{3,4}={3,8}.)

This would be a really useful feature. I have a student using the Prime who recently asked about this as it is available on the TI calcs.
Find all posts by this user
Quote this message in a reply
12-06-2015, 05:34 PM
Post: #5
RE: What do you think about this idea ?
(12-05-2015 02:42 PM)dg1969 Wrote:  F2(X) : X^{2*{1:2,0.5}} => 3 curves X^2; X^(2*1.5); X^(2*2)

This could already be handled with the seq and mat2list commands
F2(X) : X^{2*mat2list(seq(K,K,1,2,0.5))}

It's too bad seq() doesn't just return a list instead of a vector.

Quote:F4(X) : [1,2]*X^2+[2,3]*X => 4 curves (1,2); (1,3); (2,2); (2,3)

This could get quickly out of hand.
F4(X) : [1,5]*X^2+[1,5]*X+[1,5]
would generate 125 curves. Typically, a user would want few enough curves to just use the other syntax.
F4(X) : {1,1,2,2}*X^2+{2,3,2,3}*X => 4 curves (1,2); (1,3); (2,2); (2,3)
Find all posts by this user
Quote this message in a reply
12-06-2015, 08:06 PM
Post: #6
RE: What do you think about this idea ?
What I thought might be nice is adding a view where one could specify a table of values for user variables. Let a user define F1(X) as M*X+B and then enter M and B values in a table (like the build-your-own numeric view lets one enter X values, but with two columns for user entry). Explicitly naming the "family" constants would allow for the names to be used when identifying particular members of the set of functions (when tracing or when in a numeric view).
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)