[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multiple input()
From: |
Joe Koski |
Subject: |
Multiple input() |
Date: |
Thu, 18 Nov 2004 21:10:28 -0700 |
User-agent: |
Microsoft-Entourage/11.0.0.040405 |
To quote from the February 1997 GNU Octave Manual, p. 127: "Currently input
[meaning the Octave input() function] only returns one value, regardless of
the number of values produced by the the evaluation of the expression."
Entering "help input" in Octave-2.1.57 gets the same wording.
Have any changes/updates allowed prompting for the reading a specified
number of values? Is there a "workaround" that uses scanf(template,"C"), or
similar constructs, that allows the number of inputs to vary from run to
run?
For a simple data plot display, I would like to ask: "How many columns to
plot?: 3". (That I can do.) Then I would enter a varying number of column ID
numbers, e.g. 5,10,15. Or, better yet, just count three entries and produce
the plots.
Yes, I could do it with a loop with input() asking for one column ID number
at a time.
Any ideas? Tricks? Suggestions? Thanks.
Joe
-------------------------------------------------------------
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
-------------------------------------------------------------
- Multiple input(),
Joe Koski <=