MATLAB - Only plot a spherical section of data set which is cubic -


i have physics model simulates few things in radius of 5000 km around object in spherical coordinates. found no way interpolate spherical coordinates in matlab changed them cartesian sph2cart function. used scatteredinterpolant function 10000 10000 10000 km meshgrid interpolate data. want plot data sphere of radius 5000 km. there nice way plot specified volume of data?

if want delete part of data "spherically" can do

being x,y,z geometric data , v values:

level=5000; %km (or whatever value in data) v(sqrt(x.^2+y.^+z.^2)>level)=0;  %or depending in plotting functions.  v(sqrt(x.^2+y.^+z.^2)>level)=nan;   % plot things 

Comments