help-octave
[Top][All Lists]
Advanced

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

Re: Creating a varargin-like object


From: John W. Eaton
Subject: Re: Creating a varargin-like object
Date: Tue, 21 Feb 2006 14:49:18 -0500

| >>Suppose I have a collection of strings 'A', 'B', ... What should XXX be in
| >>the following:
| >>     XXX = ?????
| >>     menu('sometext', XXX)
| >>so that the choices in the menu are 'A', 'B', etc. In other words, how do I
| >>create a varargin-like object from scratch?

People have mentioned cellstr for converting from a character matrix
to a cell array of character strings, but there is also the simpler

 c = {'a', 'collection', 'of', 'character', 'strings'};

If you just want to create a cell array of character strings from
scratch, there is no need to create a character matrix first.

jwe



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