octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Matlab-compatible string class


From: Richard Crozier
Subject: Re: Matlab-compatible string class
Date: Fri, 29 Dec 2017 00:57:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0



On 28/12/17 16:41, Rik wrote:
On 12/27/2017 09:38 PM, address@hidden wrote:


I don't see a smooth transition path either.  Although Matlab presents the string class as a fundamental data type, it is actually closer to a container data type like a cell array.  In fact, by using cell arrays of strings you can make portable code that will run in either Octave or Matlab.  Maybe this is unkind, but the principal advantage seems to be the syntactic sugar of using parentheses '()' for indexing rather than cell array indexing '{}'.


I believe you can also do things like:

x = "the cat " + "sat on the mat"

which is kind of handy. More like a python string.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]