フィルターのクリア

How can I find it?

2 ビュー (過去 30 日間)
Furkan Ozkan
Furkan Ozkan 2021 年 6 月 22 日
コメント済み: Furkan Ozkan 2021 年 6 月 22 日
how can I find f(-0,3) on matlab?

採用された回答

Walter Roberson
Walter Roberson 2021 年 6 月 22 日
There is not just one answer: it depends upon what model function you use
x = [-0.4, 0, 0.4, 0.8, 1.2]
x = 1×5
-0.4000 0 0.4000 0.8000 1.2000
fx = [-0.204, -0.07, -0.006, 0.442, 1.658]
fx = 1×5
-0.2040 -0.0700 -0.0060 0.4420 1.6580
fx03 = interp1(x, fx, -0.3)
fx03 = -0.1705
fx03s = interp1(x, fx, -0.3, 'spline')
fx03s = -0.1382
p3 = polyfit(x, fx, 3);
fx03p3 = polyval(p3, -0.3)
fx03p3 = -0.1427
The cubic fit looks pretty good.
  1 件のコメント
Furkan Ozkan
Furkan Ozkan 2021 年 6 月 22 日
thanks!

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

その他の回答 (1 件)

Chunru
Chunru 2021 年 6 月 22 日
You can use interp1 to interpolate. 'doc interp1' for more details.
x = [-0.4 0 0.4 0.8 1.2];
f = [-0.204 -0.07 -0.006 0.442 1.658];
y = interp1(x, f, -0.3)
y = -0.1705

カテゴリ

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

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by