MATLAB: How to plot 3-D grid data in scatter plot

plot 3-d grid data

Hello Community,
I have 2 datasets from a 3-D simulation model. I can easily read these datasets into Matlab and see the data. I now want to plot these 2 datasets on a scatter plot. I am struggling to get this data plotted.
I load the grid with:
>> A=load('PERM2.mat')
A =
struct with fields:
Node: [1×1 struct]
Same for 2nd dataset.
When I do:
>> plot(A.Node.Value,B.Node.Value)
Error using plot
Data cannot have more than 2 dimensions.
And this is where I am stuck. Any suggestion what I am doing wrong or what I need to do to plot these 2 datasets? I have attached the 2 datasets.
Thanks,
Ferry

Best Answer

I think your mat files has 3D matrices. You need to use cpcolor or surf to plot them.
load PERM2.mat ;
A = Node.Value ;
[m,n,p] = size(A) ;
for i = 1:p
pcolor(A(:,:,i))
shading interp
colorbar
drawnow
end
If you have x, y you can provide them in pcolor.