# Interpolate both x and y values in Matrix to find one point

3 visualizzazioni (ultimi 30 giorni)
Selina il 1 Set 2022
Commentato: Selina il 1 Set 2022
I currenlty have the following table. Each angle (from -5 to 20 degree) has one value for Reynolds Number 10,000 and so on. I.e. at Re=10,000 and -5 degree I have a value of -0.0387 etc.
I want to determine a value that is located at Reynods Number = 11,000 and angle 18 degree.
How can I obtain that value? I would have to interpolate for both rows and colums but not sure how to go about it the best. In Matlab, I only have the values saved. The matrix does not have 10,000-160,000 or the different angles. I added a note to my script that said coloum one corresponds to -5 at varying Reynolds number etc.
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Bruno Luong il 1 Set 2022
assuming the data has first dimension correspond to the Reynoid and secind dimension to yhe angle
theta = [-5:2:11 20];
R = 10000:10000:160000;
% data = rand(length(R),length(theta))
datainterp = interp2(theta,R,data,18,11000)
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Selina il 1 Set 2022
Thank you so, so much! This is exaclty what I wanted to do.

Accedi per commentare.

### Categorie

Scopri di più su Resizing and Reshaping Matrices 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