How to get relatively smooth plot than step plot

조회 수: 15 (최근 30일)
Sushil Chaskar
Sushil Chaskar 2016년 5월 20일
편집: Sushil Chaskar 2016년 5월 20일
hi, I have 2 arrays having around 400 values of x and y. I plotted the graph but it came out to be rather stepped than smooth. I was wondering if we can plot a smother curve..? Attaching plot image and curve...
a[400] % not mentioning values ;
b[400];
f = figure();
plot(a,b)
filename = [sprintf('%01d',1) '.jpg'];
saveas(f, filename,'jpg');
n = numel(x);
xi = interp1( 1:n, a, linspace(1, n, 10*n) );
yi = interp1( a, b, xi );
hold all;
plot( xi, yi );

답변 (0개)

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by