| Contents | Index |
B = cast(A, newclass)
B = cast(A, newclass) converts A to class newclass, where newclass is the name of a built-in data type compatible with A. The cast function truncates any values in A that are too large to map into newclass.
Convert an int8 value to uint8:
a = int8(5); b = cast(a,'uint8'); class(b)
MATLAB returns:
ans = uint8
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |