Interpolation in a table or a matrix

1 Ansicht (letzte 30 Tage)
N/A
N/A am 28 Mär. 2017
Bearbeitet: Rena Berman am 14 Mai 2020
Hi, I need to write down a code and need an interpolation of that table which I uploaded. In my code I wrote it as a matrix but really dont know how to make the interpolation since I am new to MATLAB. Here I need to input, one is tD value and the other one is 2*pi*Rh'*lambda, so it seems is 2 dimension interpolation. I hope there is someone could help me.
Thanks in advance.
  2 Kommentare
Stephen23
Stephen23 am 3 Mai 2020
Original question by Sedat Erkal on 28 Mar 2017, retrieved from Google Cache:
Interpolation in a table or a matrix
Hi, I need to write down a code and need an interpolation of that table which I uploaded. In my code I wrote it as a matrix but really dont know how to make the interpolation since I am new to MATLAB. Here I need to input, one is tD value and the other one is 2*pi*Rh'*lambda, so it seems is 2 dimension interpolation. I hope there is someone could help me.
Thanks in advance.
Rena Berman
Rena Berman am 14 Mai 2020

(Answers Dev) Restored edit

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Steven Lord
Steven Lord am 28 Mär. 2017
Take a look at the interp2 function.
  2 Kommentare
John D'Errico
John D'Errico am 29 Mär. 2017
Steve is of course correct. ALWAYS trust Steve. interp2 is exactly what you need. Read the help carefully. look at
doc interp2
You will find examples of use in there, that should help you.
Walter Roberson
Walter Roberson am 29 Mär. 2017
It is not necessary to use meshgrids to enter that table or do interpolation with it. You can use marginals as your values
interp2(t0, bore, TwoDArrayOfValues, t0_to_sample_at, bore_to_sample_at)
all of those except TwoDArrayOfValues can be vectors.
If you want to sample at meshgrids, then build them:
t_sample_at = logspace(-1, 2, 20);
bore_sample_at = [0, logspace(-2, 2, 25)];
[G1, G2] = meshgrid( t_sample_at, bore_sample_at );

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by