I have two vectors (plain lists), say a,b
, from which I generated a 2d table, say mat
. It's not a direct expression like mat[[i,j]] = a[[i]] + b[[j]]
, rather some more complicated computation that spans much of my code, but each entry $ij$ is essentially just some function of the corresponding a[[i]]
and b[[j]]]
.
I'd like to plot that, perhaps as a contour plot, but I see that Mathematica expects the data to be given as a matrix where each entry $ij$ is a triplet a1[[i]],a2[[j]],mat[[i,j]]
.
How do I construct this matrix of triplets in a proper Mathematica "way of thinking"? (i.e. without nested loops etc.) Or alternatively, can I use my current data structure and plot it directly?
ListContourPlot
, it doesn't make any difference how you generated yourmat
$\endgroup$