By using linear interpolation How can we find unkown 500 data values by using known data points(x,y,z) ?
2 次查看(过去 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?
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!