How to smoothen the curve for yaxis in logx axis?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anu G
el 21 de Nov. de 2018
Comentada: Star Strider
el 22 de Nov. de 2018
y=0.2:.1:1
y = [0.92,0.9,0.75,0.47,0.32];
x = [10e-02,10e-1, 10e0, 10e1, 10e2];
ylim ([0.2 1])
loglog(x,y,'LineSmoothing','on')
set(gca,'YLim',[0 1])
grid on
Respuesta aceptada
Star Strider
el 21 de Nov. de 2018
Try interpolation:
y = [0.92,0.9,0.75,0.47,0.32];
x = [10e-02,10e-1, 10e0, 10e1, 10e2];
xi = logspace(log10(min(x)), log10(max(x)), 50);
yi = interp1(log(x), log(y), log(xi), 'pchip');
ylim ([0.2 1])
loglog(x, y)
hold on
loglog(xi,exp(yi))
hold off
set(gca,'YLim',[0 1])
grid on
2 comentarios
Más respuestas (0)
Ver también
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!