I have a function
f[x_,y_,z_]:= a^x b^y c^z
and I want to evaluate it for various values of x,y,z always coming in triples. This means I have a database with columns x,y,z and rows vectors say A,B,C. (Sorry I could not write a Latex table here for some reason!)
How does one create such a table on Mathematica and then asks the function to directly compute 1) f[vector A] instead f[x,y,z] and 2) say the sum or product of vectors A,B, and C?
f @@ {X, Y, Z}
- seeApply
$\endgroup$Dataset
, which has a convenient (and I think optimized)Query
syntax, or withAssociation
, from which you canLookup
. That said, there are probably a dozen different ways to get this done. $\endgroup$\begin{bmatrix} ... \end{bmatrix}
if you want to draw a table with mathjax. $\endgroup$Dataset
, but the question seems to be only about how to apply a function to a list of vectors. For this all you need isf @@@ {A,B,C}
. Don't make aDataset
if you don't plan to use the querying functionality. $\endgroup$