MATLAB: Create 4D surface plot from x, y, z and c column vectors

3d3d plotsMATLABplotplottingsurf

I have 4 columns in a table named A. The 3 columns x,y,z are the initial conditions and c is the result of a specific function I use c = f(x,y,z). I want to show the result c[i] for every case x[i],y[i],z[i] as a surface where the colour will stand for how high/low the value of c is.
I use the code below:
xx = A.x
yy = A.y
zz = A.z
cc = A.c
but the following error appears:
Z must be a matrix, not a scalar or vector.
Any ideas?

Best Answer

scatteredInterpolant or TriScatteredInterp. Then evaluate at a regular grid. Then you can isosurface() or slice()