how to make a uniform spacing grid for non-uniform spacing grid in 3-d
4 views (last 30 days)
Show older comments
i made a field of transmitter and receiver array in 3d which has non-uniform spacing in grid. i want to make a uniform spacing grid for nonuniform spacing grid. i tried but non-uniform spacing grid is not fully covered. my code is :
theta=-pi/6:pi/180:pi/6;
phi=-pi/6:pi/180:pi/6;
[theta,phi]=meshgrid(theta,phi);
for rho=5:.025:50
[x,y,z]=sph2cart(theta,phi,rho);
mesh(x,y,z,'edgecolor','r'); %field which has non-uniform spacing grid
hold on
% uniform spacing grid
x1=linspace(min(x(:)),max(x(:)));
y1=linspace(min(y(:)),max(y(:)));
z1=linspace(min(z(:)),max(z(:)));
[xs,ys]=meshgrid(x1,y1);
zs=meshgrid(z1);
mesh(xs,ys,zs,'edgecolor','g');
hold on
end
i want that uniform grid covers the non-uniform grid. i have doubt that either i could not make the exact uniform grid or i have made the exact grid in above program and it just the visualization problem because i included the all over range of coordinates of non-uniform grid..
Please help me to solve my problem
0 Comments
Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!