diff --git a/utils/image3i.m b/utils/image3i.m index 3065a4c5..01676915 100644 --- a/utils/image3i.m +++ b/utils/image3i.m @@ -135,7 +135,7 @@ if nargin < 3 || handle == 0 % Make a new surface h = surface('XData', x, 'YData', y, 'ZData', z, ... - 'CData', im, ... + 'CData', double(im), ... 'FaceColor', 'texturemap', ... 'EdgeColor', 'none', ... 'LineStyle', 'none', ... @@ -145,7 +145,7 @@ 'CDataMapping', 'direct'); else % Reuse old surface - set(handle, 'XData', x, 'YData', y, 'ZData', z, 'CData', im); + set(handle, 'XData', x, 'YData', y, 'ZData', z, 'CData', double(im)); h = handle; end