Interpolation in a table or a matrix

1 次查看(过去 30 天)
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 个评论
Stephen23
Stephen23 2020-5-3
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.

请先登录,再进行评论。

采纳的回答

Steven Lord
Steven Lord 2017-3-28
Take a look at the interp2 function.
  2 个评论
John D'Errico
John D'Errico 2017-3-29
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 2017-3-29
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 );

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by