Interpolate 2D array at certain point
Show older comments
I have a 8x32 table with values of interest that correspont to points defined by the first row and the first column.
The values of the table at the first column are inside [1,20] and the values of the first row are inside [0.0012,5]
Here's what I need to do:
For a certain point, let's say (1.005 , 5.5) , I want my script to load the matrix, interpolate it's values and return the corresponding value to the given point.
During my tries I kept on receiving the error:
Error using .' (line 191)
Undefined function 'transpose' for input arguments of type 'table'.
Error in interp2 (line 122)
V = V.';
The code I've tried was:
load('bw20')
interp2(bw20(1,2:32),bw20(2:8,1),bw20,1.005,5.5);
2 Comments
Adam
on 31 Oct 2019
What is bw20?
If it is a table you likely need to call its values as
bw20{1,2:32}
rather than use parenthesis which, I think, returns a sub-table rather than a numeric array. Table inputs are not supported by interp2. I'm surprised it gets as far as it does into the function before complaining about that.
Antonis Gikas
on 31 Oct 2019
Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!