[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [changeset] make str2mat an alias of char
From: |
dbateman |
Subject: |
Re: [changeset] make str2mat an alias of char |
Date: |
Sun, 30 Nov 2008 00:11:01 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Sat, Nov 29, 2008 at 11:56:23PM +0100, Thorsten Meyer wrote:
> Hi,
>
> attached is a changeset that removes the str2mat.m function file and makes
> str2mat an alias of char.
> The two functions do the same as far as I can see. Only the internal char
> function is of course much
> faster than the str2mat.m function file. To me, it looks like str2mat is a
> leftover from a time
> when char() was less permissive with respect to its input arguments.
>
> regards
>
> Thorsten
Looking at
http://www.mathworks.com/access/helpdesk/help/techdoc/ref/str2mat.html
it seems that str2mat is considered as obselete. I'd therefore be
inclined to move str2mat to scripts/deprecated but written as something
like
function varargout = str2mat (varargin)
persistent warned = false;
if (! warned)
warned = true;
warning ("Octave:deprecated-function",
"str2mat is obsolete and will be removed from a future
version of Octave; please use char instead");
endif
varargout = cell (nargout, 1);
[ varargout{:} ] = char (varargin{:});
endfunction
Cheers
David