help-octave
[Top][All Lists]
Advanced

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

Re: Plotting and tables


From: Andreas Weingessel
Subject: Re: Plotting and tables
Date: Fri, 14 Mar 1997 14:58:26 +0100

>>>>> On Fri, 14 Mar 1997 12:53:30 +0100,
>>>>> Daniel Tourde wrote:

> Hello,
> I have two questions :
>       I would like to define a string x="Hi evrybody"
>         and to set gset title x for the plotting. This syntax is not
> accepted. Of course if I use gset title "Hi evrybody" it works but, my
> idea is to insert into the x string some variables with the sprintf
> function. e.g : a=1
>                 x=sprintf("a=%d",a)
>               gset title x
> How can I do ?

Try
octave:1> x="hello world";
octave:2> eval(sprintf("gset title '%s'",x))

The above example could be implemented as

octave:3> a=1;
octave:4> eval(sprintf("gset title 'a=%d'",a))



>       I would like to create tables of number with a rank > 2.
>         A matrix is a 2 dimension number table. I would like to create a
> three dimension number table reachable via A(1,2,3) for instance. How
> can I do ?

I would like this too!

You could try to create matrices a1,a2,a3,... . Then,

        eval(sprintf("a%d(2,3)",1))

gives the (2,3) element of matrix a1. But, of course that's not the
same as having multidimensional arrays.

Best Regards,
        Andreas

************************************************************************
*                          Andreas Weingessel                          *
************************************************************************
* Institut für Statistik      *                Tel: (+43 1) 58801 4541 *
* Technische Universität Wien *                Fax: (+43 1)  504 14 98 *
* Wiedner Hauptstr. 8-10/1071 *     address@hidden *
* A-1040 Wien, Austria        * http://www.ci.tuwien.ac.at/~weingessel *
************************************************************************



reply via email to

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