Interpolate 2D array at certain point
显示 更早的评论
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 个评论
Adam
2019-10-31
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
2019-10-31
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!