help-octave
[Top][All Lists]
Advanced

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

Re: how to convert "list" to string


From: Joao Cardoso
Subject: Re: how to convert "list" to string
Date: Fri, 12 Feb 1999 09:19:37 +0000

Karim Elaagouby wrote:
> 
> Hi,
> 
> I am using version 2.1.13
> argv is passed as a list. How do I convert its elements into strings ?
> 
> ============================================================
> this is the example given in the doc:
> 
> #! /bin/octave -qf
> printf ("%s", program_name);
> for i = 1:nargin
>   printf (" %s", argv(i,:));
> endfor
> printf ("\n");

try this way:

#! /usr/local/bin/octave -qf
printf ("%s", program_name);
for i = 1:nargin
  printf (" %s", nth(argv,i));
endfor
printf ("\n");

Joao

-- 
Joao Cardoso                |   e-mail: address@hidden
INESC, R. Jose Falcao 110   |   tel:    + 351 2 2094322
4050 Porto, Portugal        |   fax:    + 351 2 2008487



reply via email to

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