MATLAB: How to create a matrix from 3 vectors

heat mapmatrixvector

Hello,
I would like to ask if anyone knows how to create a matrix from 3 vectors: values (z), latitude (y), and depth (x), as I want to create a heatmap from this data. In my case, I want to plot z in a 2D (x,y). I found this link to create 'customizable heat maps', but I need my data as a matrix.
Any suggestions? Thank you!

Best Answer

griddata()