help-octave
[Top][All Lists]
Advanced

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

Re: string vectors and matrices in Octave


From: Per Persson
Subject: Re: string vectors and matrices in Octave
Date: Thu, 23 Aug 2001 20:01:29 +0200

Try
>> printf ("%s %s %s\n",x(1,:),x(2,:),x(3,:) )
123 456 sap

octave 2.1.34 on osx.
/Per

On torsdag, augusti 23, 2001, at 07:35 , E. Joshua Rigler wrote:

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




-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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