필터 지우기
필터 지우기

Interpolation of matrices corresponding to time vector

조회 수: 3 (최근 30일)
Ashok Das
Ashok Das 2019년 6월 25일
댓글: KALYAN ACHARJYA 2019년 6월 26일
I have a vector containing time points, and a cell structure containing matrices as its elements.
I want to interpolate the corresponding matrix for some time point which is not in the time vector. How to do that?
Presentation1.png
  댓글 수: 4
infinity
infinity 2019년 6월 26일
Hello,
You could try to look at this
maybe it will help.
Bjorn Gustavsson
Bjorn Gustavsson 2019년 6월 26일
Or, depending on sizes, it might be more efficient to interpolate all matrix components at the same time with interp3, or interpn. The different interpolation functions have slightly different options when it comes to interpolation methods.
HTH

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

채택된 답변

Andrei Bobrov
Andrei Bobrov 2019년 6월 26일
Variant with interp1:
t = [1, 2, 3];
A = {[1, 1; 1, 1] ,[1, 0.9;0.95, .87] , [1.1, 0.85;0.91, .8]};
tt = [1.2, 2.1, 2.9];
out = interp1(t(:),permute(cat(3,A{:}),[3,2,1]),tt);
out = permute(out,3:-1:1);
  댓글 수: 2
Ashok Das
Ashok Das 2019년 6월 26일
Thank you for yor reply. Can you please elaborate the code a bit. It will be reallly helpfull.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 6월 26일
The answered is already provided by @Andrei, Hello @Ashok, please accept the answer to give due credit to the answer provider.

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

추가 답변 (1개)

Vismay Raj
Vismay Raj 2019년 6월 26일

카테고리

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