diff toString.m @ 44:92247f4bad2f

Added toString function.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 05 Nov 2015 16:28:14 -0800
parents 54d3ab296ba0
children edccf4ba788b
line wrap: on
line diff
--- a/toString.m	Thu Nov 05 16:24:20 2015 -0800
+++ b/toString.m	Thu Nov 05 16:28:14 2015 -0800
@@ -11,13 +11,13 @@
 end
 
 function str  = value2string(value)
-    if isnumeric(value) || ischar(value)
+    if isnumeric(value) || ischar(value) || islogical(value)
         str = mat2str(value);
     elseif isstruct(value)
         str = struct2string(value);
     elseif iscell(value)
         str = cell2string(value);
-    elseif isa('function_hande')
+    elseif isa(value,'function_hande')
         str = func2str(value);
     else
         warning('No string representation for class ''%s''', class(value))