필터 지우기
필터 지우기

Interpolate non-unique values

조회 수: 24 (최근 30일)
mldmnn
mldmnn 2018년 6월 18일
댓글: mldmnn 2018년 8월 6일
I have two vectors for a symmetrical flyover to compute an aircraft noise footprint:
pressure = [0 0.5 1 2 4 2 1 0.5 0]
tUnequal = [4 4.3 5 6 6.3 7 7.13 9]
I want to interpolate that symmetric pressure vector for an evenly spaced time like:
tEqual = [4 5 6 7 8 9].
Interp1 does not work in this case due to the symmetry of the pressure vector:
Error using griddedInterpolant
The grid vectors must contain unique points.
Any suggestions?
  댓글 수: 2
Matt J
Matt J 2018년 6월 18일
In what way does it "not work"?
mldmnn
mldmnn 2018년 6월 18일
Error using griddedInterpolant
The grid vectors must contain unique points.

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

채택된 답변

Matt J
Matt J 2018년 6월 18일
편집: Matt J 2018년 6월 18일
This might be what you want
>> pressureEqual=interp1(tUnequal, pressure(1:length(tUnequal)), tEqual)
pressureEqual =
0 1.0000 2.0000 2.0000 0.7674 0.5000

추가 답변 (0개)

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by