How can I get plot with smooth lines from this data?
古いコメントを表示
Hi.
I want to get plot with smoother lines from this data.
a=(500,1000,1700,1300,1400,3900,3400,3000,2200,2400,3300,3800,4500,4500,4400,4300,4600,3700)
x=(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18)
Thanks.
採用された回答
その他の回答 (2 件)
KALYAN ACHARJYA
2019 年 6 月 26 日
編集済み: KALYAN ACHARJYA
2019 年 6 月 26 日
a=[500,1000,1700,1300,1400,3900,3400,3000,2200,2400,3300,3800,4500,4500,4400,4300,4600,3700]';
x=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]';
f=fit(x,a,'smoothingspline')
plot(f);

5 件のコメント
Muhammad Taseer Islam
2019 年 6 月 26 日
KALYAN ACHARJYA
2019 年 6 月 26 日
Is my answered in incorrect?
Muhammad Taseer Islam
2019 年 6 月 27 日
KALYAN ACHARJYA
2019 年 6 月 27 日
Have you have run the code, as provided (Copy and run)?
Can you show me the error?
Muhammad Taseer Islam
2019 年 6 月 27 日
infinity
2019 年 6 月 26 日
Hello,
There is an option that you can refer,
a1 = smooth(a);
plot(x,a1)
There are many types of smooth function, you may read links below for more options.
カテゴリ
ヘルプ センター および File Exchange で Smoothing and Denoising についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
