interpolation on look up table

2 次查看(过去 30 天)
Hi guys i am new with this staff and i have problem.
I have three variables Altitude and Force which ara A, F and M.
A=5x1 matrix let sayA=[1000 1500 2000 2500 3000] and
F=20x1 F=1:1:20;
I have a table M=20x5 that consist of every M value for each altitude A, and Force F
eg. M(1,1)=M(Altitude{1000},Force{1}) , M(2,1)=M(Altitude{1000},Force{2})
like these.
My problem is, i need to find M values using interpolation between break points, like A= 1250 and F=2.5 M=?
how can i do this ?

采纳的回答

Andrei Bobrov
Andrei Bobrov 2014-9-2
Use griddedInterpolant:
A = 1000:500:3000;
F = 1:20;
M = randi([-100 100],20,5);
[X,Y] = ndgrid(F,A);
FF = griddedInterpolant(X,Y,M);
out = FF(2.5,1250);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by