Hello I want to interpolating between variables as below: x=matrix with 2×54 dimension and y=matrix with 1×54 dimension and x_q=matrix or vector with 2×1 dimension. Is it possible to use interp1 or interp2 functions?

 채택된 답변

Torsten
Torsten 2021년 12월 27일

0 개 추천

F = scatteredInterpolant(x(1,1:54),x(2,1:54),y(1,1:54));
y_q = F(x_q(1),x_q(2))

댓글 수: 1

Ali Sotoudeh
Ali Sotoudeh 2021년 12월 28일
Thank you dear friend. problem solved with your suggestion. But the inputs must be specified in column-vector format.

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

추가 답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 12월 27일

0 개 추천

If understood your question correctly, in this case - you're trying to interpolate with 1-by-54 of y using 2-by-54 of x. if this is the case, you'd need to have matched sizes for x and y. Otherwise, it does not make quite much of a sense.

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

제품

릴리스

R2017b

질문:

2021년 12월 27일

댓글:

2021년 12월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by