# HG changeset patch # User David Bateman # Date 1202817645 -3600 # Node ID feb791af5d9ff4c1bcd6f0d4502849280d0ea862 # Parent 2d8315dcd8d2794db8f0df64c499b39357aaced8 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);