フィルターのクリア

By using linear interpolation How can we find unkown 500 data values by using known data points(x,y,z) ?

1 回表示 (過去 30 日間)
[x1,y1,z1] = [2 3 4]; % starting value
[xn,yn,zn] = [7 2 5]; % ending value
by using linear interpolation i want to generate 500 unkown values inbetween known starting and ending value...
i know the linspace function,,but i want to generate points by using only linear interpolation concept
i need your help
thank you?

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 9 月 2 日
If you consider are at [x1,y1,z1] at t=0 and [xn,yn,zn] at t=1, then you can write following line using linear interpolation
X1 = [2 3 4]; % starting value
Xn = [7 2 5]; % ending value
t1 = 0; % start time
tn = 1; % end time
t = linspace(0, 1, 500); % samples between start and end time
X = interp1([t1 tn], [X1; Xn], t);

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