comparison general/tostring.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +0000
parents f0a3d7d7a0e3
children
comparison
equal deleted inserted replaced
41:79632e7bcb52 42:ae596261e75f
11 11
12 function s=tostr(x) 12 function s=tostr(x)
13 if ischar(x), s=x; 13 if ischar(x), s=x;
14 elseif isnumeric(x), 14 elseif isnumeric(x),
15 sz=size(x); 15 sz=size(x);
16 if prod(sz)<16, s=mat2str(x); 16 if prod(sz)<16, s=mat2str(x,5);
17 else s=sprintf('%s[%s]',class(x),mat2str(sz)); end 17 else s=sprintf('%s[%s]',class(x),mat2str(sz)); end
18 elseif isa(x,'function_handle'), s=func2str(x); 18 elseif isa(x,'function_handle'), s=func2str(x);
19 if s(1)~='@', s=['@' s]; end 19 if s(1)~='@', s=['@' s]; end
20 elseif isa(x,'func'), s=tostring(x); 20 elseif isa(x,'func'), s=tostring(x);
21 else s=['obj:' class(x)]; 21 else s=['obj:' class(x)];