[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
string vectors and matrices in Octave
From: |
E. Joshua Rigler |
Subject: |
string vectors and matrices in Octave |
Date: |
Thu, 23 Aug 2001 11:35:37 -0600 |
Can somebody give me a quick explanation of how vectors and matrices of
strings are handled in Octave? Is it even possible to create a vector
of strings so that I can create something like...
x = ["123";"456";"sap"]
and then simply type...
printf ("%s %s %s\n",x(1),x(2),x(3) )
to get...
123 456 sap
rather than the following error...
error: single index only valid for row or column vector
More specifically, I am attempting to pass back a vector of strings from
an external library wrapped with a C++ dynamically linked function. The
strings are currently sitting in my wrapper as a very long 1-D array of
characters. Each string is already of an identical, known length,
properly padded with blanks. I just want to pass back a vector of
strings, not characters. If you can give a hint on how to do this, that
would be even better. Thanks.
-EJR
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- string vectors and matrices in Octave,
E. Joshua Rigler <=