필터 지우기
필터 지우기

"scatteredInterpolant" Function Does Not Accept Inputs of Type Single.

조회 수: 1 (최근 30일)
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
MathWorks Support Team 2019년 8월 7일
One workaround is to cast the variables of type single into type double.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by