"scatteredInterpolant" Function Does Not Accept Inputs of Type Single.
1 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2019-8-7
回答: MathWorks Support Team
2019-8-9
The function "scatteredInterpolant" does not accept inputs of type single. Is there any existing workaround?
The follow code block produces an error when passing variables of type single as input into the "scatteredInterpolant" function.
x = (1:10)';
y = randi([1,10], 10,1);
z = (11:20)';
F = scatteredInterpolant(single(y), single(x), single(z), 'linear', 'linear');
Error using scatteredInterpolant
The input points must be a double array.
采纳的回答
MathWorks Support Team
2019-8-7
One workaround is to cast the variables of type single into type double.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!