- https://in.mathworks.com/help/matlab/visualize/exploring-volumes-with-slice-planes.html (Exploring volumes with slice planes)
- https://in.mathworks.com/support/search.html/videos/making-a-sweeping-slice-through-volume-of-data-97258.html?q=&fq=asset_type_name:video%20category:matlab/volume-visualization&page=1 (Demo Video)
Slice volume data with X=Y plane?
3 views (last 30 days)
Show older comments
As an example without posting my very long code
n = 100;
rmax = 1200;
x = linspace(-rmax,rmax,n);
y = linspace(-rmax,rmax,n);
z = linspace(-rmax,rmax,n);
[X,Y,Z] = meshgrid(x,y,z);
V = X.^2 + Y.^2 + Z.^2
[xsurf,ysurf] = meshgrid(x,y);
zsurf = xsurf - ysurf;
slice(X,Y,Z,Smag,xsurf,ysurf,zsurf)
This is not working for me.
Any help would be appreciated.
Thanks in advanced,
Omar
0 Comments
Accepted Answer
Prabhan Purwar
on 3 Mar 2020
Edited: Prabhan Purwar
on 3 Mar 2020
Hi,
Following code may help,
clc
close all
clear
n = 10;
rmax = 10;
x = linspace(-rmax,rmax,n);
y = linspace(-rmax,rmax,n);
z = linspace(-rmax,rmax,n);
[X,Y,Z] = meshgrid(x,y,z);
V = X.^2 + Y.^2 + Z.^2
zslice=0;
yslice=[];
xslice=[];
hslice=slice(X,Y,Z,V,xslice,yslice,zslice);
rotate(hslice,[0 1 0],-45);
view([1 1]);
figure
isosurface(V);
hold on
hslice=slice(X,Y,Z,V,xslice,yslice,zslice);
rotate(hslice,[0 1 0],-45);
Output:
For more information kindly refer to the following link:
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!