[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: array of strings?
From: |
MrOba |
Subject: |
Re: array of strings? |
Date: |
Tue, 3 Sep 2013 07:34:37 -0700 (PDT) |
Actually I don't save it as an mxArray.. I save the array as a binary file.
Then I load it in a different session of octave like in the example of my
previous post.
octave_scalar_map m = do_load (file, "test.bin", format,
flt_fmt, false, swap, true, argv,
0, 1, 1).scalar_map_value ();
std::cout << m.contents ("test_var").matrix_value ();
retval = m.contents ("test_var").as_mxArray ();
This last line gives me the error (invalid conversion from string to real
matrix). This happen only with a variable of type sq_string. If I save and
load the array of string generated generated with the command line:
Array1 = [ "String(0,0,0)";"String(0,0,1)";"String(0,0,2)";"String(0,0,3)";]
everything works.
The only difference I could spot is the different type (sq_string) as result
of the cast char(uint8()).
MrO
--
View this message in context:
http://octave.1599824.n4.nabble.com/array-of-strings-tp4656994p4657021.html
Sent from the Octave - General mailing list archive at Nabble.com.
- array of strings?, MrOba, 2013/09/02
- Re: array of strings?, MrOba, 2013/09/03
- Re: array of strings?, Nicholas Jankowski, 2013/09/03
- Re: array of strings?,
MrOba <=
- Re: array of strings?, MrOba, 2013/09/05
- Re: array of strings?, MrOba, 2013/09/12
- Re: array of strings?, JasonNicholson, 2013/09/12
- Re: array of strings?, MrOba, 2013/09/12
- Re: array of strings?, Mike Miller, 2013/09/12
- Re: array of strings?, Nicholas Jankowski, 2013/09/12
- Re: array of strings?, Nicholas Jankowski, 2013/09/12
- Re: array of strings?, MrOba, 2013/09/13
- Re: array of strings?, Mike Miller, 2013/09/13
- Re: array of strings?, MrOba, 2013/09/13