Why do I get unexpected errors when using NaN values in INTERP1?
古いコメントを表示
Why do I get unexpected errors when using NaN values in INTERP1?
Using the INTERP1 function of MATLAB 6.1 (R12.1) with NaN values returns an unusual error:
interp1([NaN 1:4],[2:6],3.5)
??? Index into matrix is negative or zero. See release notes on changes to
logical indices.
Error in ==> D:\Applications\MATLAB\toolbox\matlab\polyfun\interp1.m
On line 157 ==> s = u - x(k);
This error can be traced to the results of the HISTC function called earlier within INTERP1:
[n,k] = histc(3.5,[NaN 1:4])
n =
0 0 0 0 0
k =
0
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Interpolation of 2-D Selections in 3-D Grids についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!