Interpolation from a table

3 visualizzazioni (ultimi 30 giorni)
Rhiannon Elliott
Rhiannon Elliott il 10 Nov 2020
Modificato: Star Strider il 11 Nov 2020
I have a range of values:
-10000 0 10000 20000 30000 40000 50000 60000
0.0 1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0
0.2 1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0
0.4 1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0
0.6 1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0
0.8 1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0
1.0 1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0
1.2 1.4850 1.2300 0.9750 0.7440 0.5450 0.3640 0.2250 0
1.4 1.5941 1.3400 1.0860 0.8450 0.6280 0.4240 0.2630 0
Number going accross the top, altitude in feet. Numbers going down the side are Mach numbers, the values in the middle are the percentage of maximum thrust to fly in those conditions. I need to be able to interpolate values that may fall inbetween the set increments, so if i were to need the relative thrust at 0.3 Mach, 25,000 feet.
I am easily confused by Matlab so any help would be really appreciated

Risposte (1)

Star Strider
Star Strider il 10 Nov 2020
Modificato: Star Strider il 11 Nov 2020
Try this:
T = [1.2600 1.0000 0.7400 0.5340 0.3720 0.2410 0.1490 0
1.1710 0.9340 0.6970 0.5060 0.3550 0.2310 0.1430 0
1.1500 0.9210 0.6920 0.5060 0.3570 0.2330 0.1450 0
1.1810 0.9510 0.7210 0.5320 0.3780 0.2480 0.1540 0
1.2580 1.0200 0.7820 0.5820 0.4170 0.2750 0.1700 0
1.3690 1.1200 0.8710 0.6510 0.4750 0.3150 0.1950 0
1.4850 1.2300 0.9750 0.7440 0.5450 0.3640 0.2250 0
1.5941 1.3400 1.0860 0.8450 0.6280 0.4240 0.2630 0];
Altv = [-10000 0 10000 20000 30000 40000 50000 60000];
Mv = 0:0.2:1.4;
[Altm,Mm] = meshgrid(Altv, Mv);
Thrfcn = @(Mach,Altft) griddata(Mm, Altm, T, Mach, Altft);
with:
Thrust = Thrfcn(0.3, 25000)
producing:
Thrust =
0.4305
This appears to be in the correct range, looking at the table.
EDIT — (11 Nov 2020 at 21:08)
Visualising it:
.

Categorie

Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by