Smoothing contact distribution diagram in 3-D

3 visualizaciones (últimos 30 días)
Anitha S D
Anitha S D el 16 de Mzo. de 2011
I am plotting a distribution diagram after extracting the value of E(size 18 x36). This gives me a scattered plot in 3D. I would like to smoothen it using a Fouries series so that I can obtain a spherical or peanut shaped output. Any inputs on how it can be done?
theta = linspace(0,2*pi,36);
phi = linspace(0,pi,18);
[theta, phi] = meshgrid (theta, phi);
[x,y,z]= sph2cart(theta, phi, E);
surf(x,y,z)
  2 comentarios
Ashish Uthama
Ashish Uthama el 16 de Mzo. de 2011
It would help if you said more about what E was (some kind of radius?) Is the smoothing just for visualization? (In which case there might be other approaches)
Anitha S D
Anitha S D el 17 de Mzo. de 2011
Thanks Ashish. Ya, E is a distribution function and is considered as radius in this case.As you have rightly pointed out the smoothing is for visualization.

Iniciar sesión para comentar.

Respuesta aceptada

Ashish Uthama
Ashish Uthama el 16 de Mzo. de 2011
If the smoothing is just for visualization, maybe you could use simple low-pass filtering.
E = rand(18,36)+2;
theta = linspace(0,2*pi,36);
phi = linspace(0,pi,18);
[theta, phi] = meshgrid (theta, phi);
[x,y,z]= sph2cart(theta, phi, E);
figure;surf(x,y,z);title('Rough');
%naive 'smoothening' using low-pass filtering
%using a 3 by 3 averaging filter. 1/(3*3) factor will
%normalize the results.
Es = conv2(E, ones(3,3)/9, 'same');
[x,y,z]= sph2cart(theta, phi, Es);
figure;surf(x,y,z);title('Smoothened');

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by