help-octave
[Top][All Lists]
Advanced

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

Re: array of strings?


From: Nicholas Jankowski
Subject: Re: array of strings?
Date: Tue, 3 Sep 2013 09:28:59 -0400

well, not sure what the saving issue is, but type: sq_string is a
Singly quoted string.  I.e.,
'this is a singly quoted string'
"this is a doubly quoted string"
http://www.gnu.org/software/octave/doc/interpreter/Character-Strings-in-Oct_002dFiles.html

I believe the primary difference (there may be others) is how escape
characters are interpreted between the two. In a dq string, \n is
interpreted as a newline character. in a sq string \n is interpreted
as \n.

It appears that doing a char(uint8()) operation defaults to a sq
string, I assume to prevent odd/unintentional escape sequences from
occurring.

What is the save command you are using? specifically what way are you
specifying it to save as an mxArray?  Straight 'saves' of the data
work in all of the formats supported by 'save', but I'm not overly
familiar with saving out as mxArrays. a quick google shows that
character strings in mex files do not differentiate between single and
double quoted arrays. as such, maybe there's an issues with handling a
sq_string type?
http://www.obihiro.ac.jp/~suzukim/masuda/octave/html3/octave_195.html#SEC339

Nick J.

On Tue, Sep 3, 2013 at 4:15 AM, MrOba <address@hidden> wrote:
> Anybody?
>
> To add something, after I save the variable to a binary file, I try to read
> it like in the example from http://wiki.octave.org/Octave_load
>
> This works well with numeric matrix, but I can't find how to have it working
> with an array of strings.
>
> MrO
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/array-of-strings-tp4656994p4657013.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave


reply via email to

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