Q:

Plot data on to an isosurface in MatLab

I have two 3D arrays, one contains the 3D data of an electric field and the other is a 3D mask of the object that I am interested in, taking the product of these two arrays gives me an array with the electric field of just the mask. I have successfully created an isosurface of the mask but when I try to make an isosurface of the product of the mask and the electric field array I get the same graph as when I plot just the mask (which is just an array of zeroes and 1's). Is there a way to represent the data on the isosurface?
For the moment I simply put my arrays in to the isosurface function:
isosurface(mask), which gives me: 

I then try to plot the product of my mask and data array:
isosurface(mask.*EArr) and I get the following:

But if I look at just a single slice using the code
imagesc(mask(:,:,35).*EArr(:,:,35)) I get:

What I'm looking to do is to get view the slices of the last picture as a 3D object similar to the way that I can view my mask as a 3D object in the first picture.

A:

If I understand well, you want to plot your field on the surface of your mask.
To do so, get the patch returned by isosurface, then intrepolate your field on vertices of this patch. Finaly, plot it using the resulting interpolated data as 'FaceVertexCData'.
Here is an example with dummy data :
% PREPARATION
% ===========
% GENERATE A GRID
[X Y Z] = meshgrid([0:1/100:1],[0:1/100:1],[0:1/100:1]);
% GENERATE RANDOM DATA
DATA = zeros(101,101,101);
DATA(:) = interp3([0:1/10:1],[0:1/10:1],[0:1/10:1],rand(11,11,11),X(:),Y(:),Z(:),'cubic');
% GENERATE A RANDOM MASK
MASK = zeros(101,101,101);
MASK(:) = sqrt(sum([X(:)-0.5 Y(:)-0.5 Z(:)-0.5].^2,2)) - 0.3 - interp3([0:1/10:1],[0:1/10:1],[0:1/10:1],0.1*rand(11,11,11),X(:),Y(:),Z(:),'cubic');
%
% ACTUAL PROBLEM
% ==============
% EXTRACT THE MASK SURFACE
SURF = isosurface(X,Y,Z,MASK,0);
% INTERPOLATE DATA ON MASK SURFACE
DATA_SURF = interp3(X,Y,Z,DATA,SURF.vertices(:,1),SURF.vertices(:,2),SURF.vertices(:,3));
% PLOT THE MASK SURFACE AND DATA
hold on; axis square; axis([0 1 0 1 0 1]); view(3); camlight
patch('Faces',SURF.faces,'Vertices',SURF.vertices,'EdgeColor','none','FaceColor','interp','FaceVertexCData',DATA_SURF);

This gives things like that : 

