help-octave
[Top][All Lists]
Advanced

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

Re: declare global as matrix...problem to use it


From: Mike Miller
Subject: Re: declare global as matrix...problem to use it
Date: Sat, 7 Jul 2018 12:26:15 -0700
User-agent: Mutt/1.10.0 (2018-05-17)

On Sat, Jul 07, 2018 at 00:53:22 -0700, LucaLuca wrote:
> i want an array of string..not a single string

You showed that you wanted an array with a single string, so it's hard
to infer from that what you actually want.

If you want an array of strings, then maybe this will work

    global x
    x = {"one", "two", "three"};

Or maybe you need to add them one at a time, like this

    global x
    x = {"one"};
    x(2) = "two";
    x(3) = "three";

https://octave.org/doc/interpreter/Cell-Arrays-of-Strings.html

-- 
mike

Attachment: signature.asc
Description: PGP signature


reply via email to

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