Message Boards Message Boards

0
|
5633 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:
GROUPS:

how to make functions from datasets

Posted 10 years ago

I have a csv that encodes the results of plugging certain parameters (say, A and B) into certain functions (say, f and g). Think matrix with (say, 4) columns and a million rows with the columns corresponding to A, B, C = f(A, B), and D = g(A, B) respectively. I'd like to be able to use the dynamic visualization features of mathematica, but this requires turning this data into discreet functions, and the columns into their own lists to use as domains in the Manipulate environment.

I want to be able to do something like Manipulate[Plot[function[A, B], {A, (list of values)}], {B, (list of values)}, {function, {f, g}}]

I have been poring over the Help guide for hours and this seems to be such a basic thing to do that I feel crazy for not being able to find it.

2 Replies

If you have as many records as you say you do then, I think you might look at the Mathematica function BinCounts[]. This will group your data into discrete bins, which you can define according to your needs. You can then plot, say, C=f(A,B), using ListPlot3D[] and the results from BinCounts. BinCounts can also be used either to fit your data to a model function or for interpolation.

If you just want graphical results another way is to use Histogram3D[] to plot you data.

POSTED BY: Douglas Skinner

Is "Fit" what you are looking for?

POSTED BY: Isaac Abraham
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract