define double(img(:,:,1))
显示 更早的评论
回答(1 个)
Wayne King
2012-3-20
That code is casting the first "page" of img (a 3D array) to type double.
So perhaps img is uint8 to begin with (or something like that)
img = uint8(ones(256,256,3));
xy = double(img(:,:,1));
class(img)
class(xy)
类别
在 帮助中心 和 File Exchange 中查找有关 Vehicle Dynamics Blockset 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!