Error using matlab.internal.math.interp1 The sample points must be finite.
显示 更早的评论
when I ran a script,
for i=1:sz(2)
tOut(:,i) = interp1(x(:,i),v(:,i),xq(:,i));
end
I got those errors
Error using matlab.internal.math.interp1
The sample points must be finite.
Error in interp1 (line 188)
VqLite = matlab.internal.math.interp1(X,V,method,method,Xqcol);
Error in coolprop_tab.MoistAir.calcMoistHeatCool (line 782)
tOut(:,i) = interp1(x(:,i),v(:,i),xq(:,i));
4 个评论
KSSV
2022-4-22
Attach your data x, v and xq. It seems there is a problem with the data.
huiting wang
2022-4-22
编辑:Walter Roberson
2022-4-22
huiting wang
2022-4-22
huiting wang
2022-4-26
采纳的回答
更多回答(1 个)
huiting wang
2022-4-27
0 个投票
2 个评论
凡奇
2022-11-12
I‘m also getting the same error, but I don't know how to solve it.......
Bob photonics
2025-2-14
Use this code to look for NaN/Inf values in your matrix/array/table
~isfinite(YourMatrix) %if it shows a logical 1 then you've a NaN/Inf value
[row, col] = find(~isfinite(YourMatrix)) % will show you all the locations where you have NaN values
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!