Borrar filtros
Borrar filtros

Graph smoothing not working properly

1 visualización (últimos 30 días)
Lev Mihailov
Lev Mihailov el 31 de Mzo. de 2022
Respondida: MJFcoNaN el 3 de Abr. de 2022
When trying to smooth the graph at the end, some kind of error occurs in its construction.
%a=(1+rand(1,size(x,2))).*10^-5; % this code makes my values ​​unique
%b=(1+rand(1,size(x,2))).*10^-5;
%x=x+a;
%y=y+b;
yy1 = smooth(x,y,0.1,'loess'); % with a value of 0.1 I like the beginning of the graph
plot(x,y,'b.',x,yy1,'r-') % when using "rloess" same error
Thank you in advance.
  2 comentarios
Matt J
Matt J el 31 de Mzo. de 2022
What error? You should copy/paste all error messages.
Lev Mihailov
Lev Mihailov el 1 de Abr. de 2022
@Matt J at the end of the file, the red line is not built correctly

Iniciar sesión para comentar.

Respuesta aceptada

MJFcoNaN
MJFcoNaN el 3 de Abr. de 2022
"x" is not monotonous, therefore, you should use this kind of form:
yy1 = smooth(y,0.1,'loess');

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by