# How can I get a smoothing line like Excel?

9 ビュー (過去 30 日間)
Sam Cao 2020 年 11 月 18 日
コメント済み: Sam Cao 2020 年 11 月 18 日
Dear all,
I got some test data sets and ploted them in excel, the following image is the result.
Left : no smoothing, just connecting each data with direct lines.
Right : connecting each data with default Excel smoothing method.
Excel smoothing method works well.
But I tried some Matlab methods such as interp1, it seemed that they cannot work normally in my data sets.
In my opinion, the reason is that both x value and y value are not monotonous.
So are there any methods provided by Matlab library that can solve this problem?
Or any advice about what method Excel is using to plot a smoothing curve.
Best regards,
Sam

サインインしてコメントする。

### 採用された回答

Nora Khaled 2020 年 11 月 18 日
I tried the answer to this question
x = [-1 -.6 0 .6 1 .6 0 -.6];
y = [-0 .6 1 .6 0 -.6 -1 -.6];
I think it works...
##### 1 件のコメント-1 件の古いコメントを表示-1 件の古いコメントを非表示
Sam Cao 2020 年 11 月 18 日
Thank you very much.

サインインしてコメントする。

### カテゴリ

Help Center および File ExchangePreprocessing Data についてさらに検索

### Community Treasure Hunt

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

Start Hunting!

Translated by