i have a data file which contains the x,y,z coordinates of the variable V
x y z V
0 0 0.500000000000000 3.91743717285931
0.0500000000000000 0 0.500000000000000 4.82593865902504
0.100000000000000 0 0.500000000000000 5.03874568425820
0.150000000000000 0 0.500000000000000 4.84015746128314
0.200000000000000 0 0.500000000000000 4.31320834211277
0.250000000000000 0 0.500000000000000 4.71007310928003
0.300000000000000 0 0.500000000000000 5.68353172300361
0.350000000000000 0 0.500000000000000 6.93907354201857
0.400000000000000 0 0.500000000000000 1.69713115593222
0.450000000000000 0 0.500000000000000 0
0.500000000000000 0 0.500000000000000 0
0.550000000000000 0 0.500000000000000 0
0.600000000000000 0 0.500000000000000 0.485840981213434
0.650000000000000 0 0.500000000000000 1.30265381445392
0.700000000000000 0 0.500000000000000 1.73892191516507
0.750000000000000 0 0.500000000000000 1.78720066586633
0.800000000000000 0 0.500000000000000 0.401158585618868
0.850000000000000 0 0.500000000000000 4.33700792828408
0.900000000000000 0 0.500000000000000 5.76388423361443
0.950000000000000 0 0.500000000000000 2.41835943394263
as the data file which contains the values are all in separate columns i am trying something this to convert the whole doamin into a single 3d doamin.
input = importdata('lci_000210.dat',' ',3);
nx = 96;
ny = 96;
nz = 49;
x = input.data(:,1);
y = input.data(:,2);
z = input.data(:,3);
Lci = input.data(:,4);
L3d = reshape(Lci,[nx,ny,nz]);
x3d = reshape(x,[nx,ny,nz]);
y3d = reshape(y,[nx,ny,nz]);
z3d = reshape(z,[nx,ny,nz]);
[x3d,y3d,z3d,L3d] = flow;
xslice = 5;
yslice = 0;
zslice = 0;
slice(x,y,z,Lci,xslice,yslice,zslice);
view(25,20);
colormap jet
colorbar
this however keeps throwing up the following error
V must be a 3-D array.
So i am really unsure how to deal with the dataset, what i really would like is to take a slice at any location through the dataset, but still show the 3d doamin. i have attached a picture showing how i would like the slice to be represented. I have tried re-shape but that is not working, i jave done re-shape as the data is in columns and re-shape turns it into a 3d matrix as it should be.
The data is from a fluid flow simulation
Any advice and help will be extremely helpful on how to get the slices from this data set.
in the image it shows a contourslice at y=0, but i would like it to be shown at any y position, so the it can be seen where the slice has been taken from the full 3d picture