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!