2D Lookup Table from a 6D Lookup Table via Interpolation
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone,
I have a question about lookup tables. I have a lookup Table for some aerodynamic data, that is depentend on 6 input parameters, so I have a 6D Lookup Table. If i know all the 6 parameters i can calculate the aerodynamic data via interpolation.
But i only have 4 input parameters, the other 2 are still unknown. So i want to create a 2D Lookup Table from the 6D one, that is dependent on the 2 unknown parameters.
What Matlab Function can you recomend me for this problem ?
Thank you so much :)
0 commentaires
Réponses (1)
Divyam
le 13 Juin 2025
Assuming that you are looking to create the following 2D table
from the 6D table
by fixing the first 4 dimensions
you can use the "interpn" or the "griddedInterpolant" functions for your use case.
Example: Using the "interpn" function
% Define fixed values for the known dimensions
x1_val = 0.2;
x2_val = 0.5;
x3_val = 0.1;
x4_val = 1.0;
% Create a meshgrid for the 2D unknowns. Must match 5th and 6th grid
[X5q, X6q] = meshgrid(X5, X6);
% Interpolate over the 6D table
G = interpn(X1, X2, X3, X4, X5, X6, F, x1_val, x2_val, x3_val, x4_val, X5q, X6q);
Here G is a 2D matrix of the same size as
, which represents the aerodynamic data over the two unknowns
, holding the rest fixed.
For repeated queries with different fixed values, the "griddedInterpolant" function is more efficient:
F_interp = griddedInterpolant({X1,X2,X3,X4,X5,X6}, F);
G = arrayfun(@(x5,x6) F_interp(x1_val,x2_val,x3_val,x4_val,x5,x6), X5q, X6q);
For more information regarding the "interpn" and the "griddedInterpolant" function, refer to the following documentation:
0 commentaires
Voir également
Catégories
En savoir plus sur Nonlinearity dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!