How to get relatively smooth plot than step plot
13 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!