Insert Interpolation Into Matlab Code

1 回表示 (過去 30 日間)
KIEN WEI LAI
KIEN WEI LAI 2019 年 11 月 22 日
コメント済み: KIEN WEI LAI 2019 年 11 月 25 日
Hi, I am new to Matlab programming. The graph result should be have a range of x-asix from -1 to 1, but now the graph is from 0 to 1. I want to set the range for x-axis from -1 to 1. May I know anyone can help me?
This is the current program code.
This is my current result:
Thanks in advance!
  3 件のコメント
KIEN WEI LAI
KIEN WEI LAI 2019 年 11 月 22 日
Hi, may I know how can I edit the Matlab code?
darova
darova 2019 年 11 月 22 日
You mean limits of x?
xlim([-1 1])

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

採用された回答

the cyclist
the cyclist 2019 年 11 月 22 日
Here is my best guess at what you should do, to get what you want:
  • Take the x argument out of the call to interp1
  • Change the definition of interp_no_ding to be interp_no_ding = -1:1/50:1
  1 件のコメント
KIEN WEI LAI
KIEN WEI LAI 2019 年 11 月 25 日
Thanks for your help!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by