I have a long table that calculates a column from 3 other columns.

It's not exactly a J problem, but I'm interested in J solutions or any
other ideas and advice.

I'd like to gain some intuition about how the 3 variables interact to
compute the outcome and identify any other patterns.  I have another
function that works off of 4 - 5 variables. Each of the variables are
bounded by reasonable business values. I'd like a way to plot/visualize the
adta.

Ideas I considered:
1. 3d contour plot but didn't think it would resonate with the audience and
also wouldn't work with more dimensions

2. A 2d scatter plot and label the points with two of the variables

For example: plotting x=t and y=rr and labeling "a,d" as the point label.

Any other ideas?

ts=:(i.100) + 1
as=:(i.100) % 100
ds=: (i.200)

NB. Calculate cartesian product of possible values
cc=: > , { ts;ds;as

d=:(1}"1 cc) % 10000
t=:(0}"1 cc)
a=:(2}"1 cc)
V=:1000

rr=: (V * d)  + ((V % t) * (a+0.0065)) % V

tbl=: (cc,.rr)

Example:

10 {. tbl

1 0 0.01 0.0165
1 0 0.02 0.0265
1 0 0.03 0.0365
1 0 0.04 0.0465
1 0 0.05 0.0565
1 0 0.06 0.0665
1 0 0.07 0.0765
1 0 0.08 0.0865
1 0 0.09 0.0965

 10 {.  100000 }. tbl

6 0    0 0.00108333
6 0 0.01    0.00275
6 0 0.02 0.00441667
6 0 0.03 0.00608333
6 0 0.04    0.00775
6 0 0.05 0.00941667
6 0 0.06  0.0110833
6 0 0.07    0.01275
6 0 0.08  0.0144167
6 0 0.09  0.0160833
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to