Interpolation in a table or a matrix

조회 수: 1 (최근 30일)
N/A
N/A 2017년 3월 28일
편집: Rena Berman 2020년 5월 14일
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.
Rena Berman
Rena Berman 2020년 5월 14일

(Answers Dev) Restored edit

댓글을 달려면 로그인하십시오.

채택된 답변

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