Interpolation of matrices corresponding to time vector
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ashok Das
am 25 Jun. 2019
Kommentiert: KALYAN ACHARJYA
am 26 Jun. 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226309/Presentation1.png)
4 Kommentare
infinity
am 26 Jun. 2019
Hello,
You could try to look at this
maybe it will help.
Bjorn Gustavsson
am 26 Jun. 2019
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
Akzeptierte Antwort
Andrei Bobrov
am 26 Jun. 2019
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 Kommentare
KALYAN ACHARJYA
am 26 Jun. 2019
The answered is already provided by @Andrei, Hello @Ashok, please accept the answer to give due credit to the answer provider.
Weitere Antworten (1)
Vismay Raj
am 26 Jun. 2019
this function might be useful https://www.mathworks.com/help/matlab/ref/interpn.html
0 Kommentare
Siehe auch
Kategorien
Mehr zu Interpolation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!