How to interpolate the following sample in 200 samples?

5 ビュー (過去 30 日間)
JamJan
JamJan 2019 年 7 月 25 日
回答済み: KSSV 2019 年 7 月 25 日
As I fail to understand the interp1 function:
How to interpolate the following sample in 200 samples?
A= [3,41000000000000 36,6300000000000 71,6300000000000 91,4800000000000 95,4100000000000 88,0300000000000 81,7500000000000 84,2500000000000 89,1000000000000 91,6600000000000 92,8400000000000 91,6000000000000 98,4800000000000 101,450000000000 104,280000000000 88,3700000000000 42,5500000000000 3,93000000000000 0 0 0 0 0 0 0 0 0 0 0]
Thank you!

採用された回答

KSSV
KSSV 2019 年 7 月 25 日
Let A be your data.
n = length(A) ;
x = 1:n;
xi = linspace(1,n,200) ;
Ai = interp1(x,A,xi) ;
figure
hold on
plot(x,A,'r')
plot(xi,Ai,'b')
legend('original','interpolated')

その他の回答 (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