Help needed with finding corresponding index values for given table value
Mostrar comentarios más antiguos
Hi,
i would like to do the following:
i have a two-dimensional table (see http://pastebin.com/raw.php?i=p7DQrCKT) where i have in the table cells combustion temperatures (Tc) as function of a certain propellant mixture ratio (MR) (varying horizontally in table) and combustion chamber pressure (pc) (varying vertically in table).
what i would like to achieve is to find the MR and pc combination for a given Tc value. An additional catch is that the TC value is most of the time not exactly the same as the TC values in the table hence simple 'find' will not work (also it won't work because i am not interested in the indices); in other words the algorithm should interpolate between the available Tc values in the table and find the location where the desired Tc value would be located and output the corresponding (interpolated) MR and pc values.
The data in the table is such that only one unique MR and pc combination is possible for a given Tc, hence no multiple solutions are possible.
I know when i want to find the Tc value for a given MR and pc, i can use:
mixtureratio = data(1,3:11); pressure = data(3:19,1); specificheat = data(3:19,3:11); [X,Y] = meshgrid(mixtureratio,pressure); Tc = interp2(X,Y,temperature,MR,pc);
where data is the matrix containing the data read from the text file as given in http://pastebin.com/raw.php?i=p7DQrCKT
But now i hence want to achieve the exact opposite and wonder if this can be easily done with some matlab function or someone has a tip how i could address this problem?
thank you in advance for looking at this question! kind regards,
Ruwan
2 comentarios
Iain
el 21 de Jun. de 2013
You're basically asking for someone to tell you how to get two unknowns from a single equation. This cannot be done without adding additional information.
Add additional information to help us, or all we can do is point out that it is almost certain that there will be more than one combination of MR and pc for any given Tc.
Ruwan
el 21 de Jun. de 2013
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Eigenvalue Problems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!