How to interpolate a matrix ?
6 views (last 30 days)
Show older comments
Omer Utku Altindag
on 9 May 2021
Commented: Star Strider
on 9 May 2021
Hello everyone.I have a question about an matrix.I want to a interpolation in M(10X2 double)' datas.And I want to obtain the N(9X2) matrix.Here you can see the example
time step variables time step variables
M=[ 3.2 5 N= [4 ...?
4.1 4 5 ...?
5.6 3 6 ...?
6.7 2 7 ...?
7.5 1 8 ...?
8.4 3 9 ...?
9.3 2 10 ...?
10.5 5 11 ...?
11.4 2 12 ...?]
12 6]
Thanks for your answer !!!
0 Comments
Accepted Answer
Star Strider
on 9 May 2021
Try this —
M=[ 3.2 5
4.1 4
5.6 3
6.7 2
7.5 1
8.4 3
9.3 2
10.5 5
11.4 2
12 6]
N = [4; 5; 6; 7; 8; 9; 10; 11; 12];
N2 = interp1(M(:,1),M(:,2),N)
N = [N N2]
.
4 Comments
More Answers (0)
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!