필터 지우기
필터 지우기

how to interpolate x with y and vice versa ?

조회 수: 2 (최근 30일)
Manoj
Manoj 2018년 9월 14일
댓글: ANKUR KUMAR 2018년 9월 15일
Find the attachment consists of two columns. 1st column should be interpolated with 2nd column and 2nd column should be interpolated with 1st column.

답변 (1개)

ANKUR KUMAR
ANKUR KUMAR 2018년 9월 14일
Try using interp2, spline or pchip. "interpolate first coloumn with second" ????
Lets see an example. A contains the data over 10 points. If you want to interpolate A on finer intervals (say in interval of 0.1), then code would like like:
A=randi(10,1,10);
interp1((1:10),A,(1:0.01:10))
spline((1:10),A,(1:0.01:10))
pchip((1:10),A,(1:0.01:10))
Above are the three different methods of interpolating linear matrix.
Hope you can relate this simple example with your problem.
  댓글 수: 4
Manoj
Manoj 2018년 9월 15일
2nd column consist of 6862 values (i.e up to 18.8) I need to interpolate these 6862 values with 1st column up to 64 values (i.e up 18.9). so that 6862 values should equals to 64 values .
ANKUR KUMAR
ANKUR KUMAR 2018년 9월 15일
First input of interp, spline or pchip must be either decreasing or increasing. Read these ( a , b , c ) documentation for details

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

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by