# HG changeset patch # User David Bateman # Date 1202817645 -3600 # Node ID ffbf57f4ba30b96e1fb523608291a602dfe56c6d # Parent 2be7477f470a170260d29970ce2ef9d6c814d363 Allow cast to treat the logical types diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -2,6 +2,7 @@ * plot/__go_draw_axes__.m: Set pm3d implict to fix colorbars on contour plots. + * miscellaneous/cast.m: Also treat the logical type. * plot/__go_draw_axes__.m: Use the cdatamapping property to set the cbrange. diff --git a/scripts/miscellaneous/cast.m b/scripts/miscellaneous/cast.m --- a/scripts/miscellaneous/cast.m +++ b/scripts/miscellaneous/cast.m @@ -30,7 +30,7 @@ if (ischar (typ)) if (any (strcmp (typ, {"int8"; "uint8"; "int16"; "uint16"; "int32"; "uint32"; "int64"; "uint64"; - "double"; "single"}))) + "double"; "single"; "logical"}))) retval = feval (typ, val); else error ("cast: type name `%s' is not a built-in type", typ);