help-octave
[Top][All Lists]
Advanced

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

array of strings?


From: MrOba
Subject: array of strings?
Date: Mon, 2 Sep 2013 01:39:11 -0700 (PDT)

Hi all, 

if I write:
 Array1 = [
"String(0,0,0)";"String(0,0,1)";"String(0,0,2)";"String(0,0,3)";]
I can save this array as an mxArray. the data is saved as:

# Created by Octave 3.6.3
# name: Array1
# type: string
# elements: 4
# length: 13
String(0,0,0)
# length: 13
String(0,0,1)
# length: 13
String(0,0,2)
# length: 13
String(0,0,3)

if then I write 
Array0 = char(uint8(Array1) + uint8(1))
and I do "save -" I can see  

# name: Array0
# type: sq_string
# elements: 60
# length: 13
Tusjoh)1-1-1*
# length: 13
Tusjoh)1-1-2*
# length: 13
Tusjoh)1-1-3*
# length: 13
Tusjoh)1-1-4*

The type is changed from string to sq_string. If i try to save this array as
mxArray I get an error (error: invalid conversion from string to real
matrix). Any idea why the type is changing and how I can save this second
matrix as an mxArray?

Thanks
MrO






--
View this message in context: 
http://octave.1599824.n4.nabble.com/array-of-strings-tp4656994.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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