Borrar filtros
Borrar filtros

How do I smooth a curve on a surf plot?

1 visualización (últimos 30 días)
Andrew Stark
Andrew Stark el 20 de Mzo. de 2022
Comentada: Andrew Stark el 20 de Mzo. de 2022
I have been trying to "smooth" out this curve in MATLAB but have been unable to. The goal is to have a smoother curve depicted in this surf plot. Any ideas?
I have attached the code needed to make the figure to and I used the code below to generate this figure
surf(ZFF_vals, DFF_vals, Fin

Respuestas (2)

KSSV
KSSV el 20 de Mzo. de 2022
surf(ZFF_vals, DFF_vals, Fin)
shading interp
  1 comentario
Andrew Stark
Andrew Stark el 20 de Mzo. de 2022
I think even with the shading, the data still looks rough. I was looking for something that more of alters the data, that way the curve isnt as rough. I am trying to alter this data so that it becomes a smooth curve.

Iniciar sesión para comentar.


Sulaymon Eshkabilov
Sulaymon Eshkabilov el 20 de Mzo. de 2022
You can try smoothdata() with Gaussian, e.g.:
X = load('DFF_vals.mat');
Y = load('ZFF_vals.mat');
Z = load('Fin.mat');
Zsmooth = smoothdata(Z, 'gaussian', 25);
subplot(211)
mesh(X,Y,Z)
subplot(212)
mesh(X,Y, Zsmooth), view([30, 45, 30])
  1 comentario
Andrew Stark
Andrew Stark el 20 de Mzo. de 2022
Thanks for responding. I was looking for something that more of alters the data, that way the curve isnt as rough. Something that maybe gets rid of the outliers and introduces new data points where the curve is if that makes sense.

Iniciar sesión para comentar.

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