Ronald,
The core of the problem is that autoindexing only has one internal
variable for both input and output dimension. This behavior forces
array length (output):= array length (input)
It is easy to select the right parts. The problem is to reassemble the
selected pieces from a for/while loop.
Johannes Niess
"Boozz" writes:
> I think you should use the array function: array subset (or something like
> that) I presume you use LAbView 5.x or so.
> The help-files give a perfect example of this function. After you created 2
> 1D-arrays, you can join them by the function build array.
>
> Boozz.
>
> please let me know if this is what you're asking
>
> use: r.oude.vrielink@hetnet.nl
>
> Grusse, ronald
>
> Johannes Niess nn.de> schreef in berichtnieuws
> m2ogc1xma8.fsf@server.landtechnik.uni-bonn.de...
> > Hello,
> >
> > I want to select multiple columns of an two dimensional array. My test
> > example is this:
> >
> > 1 2 3
> > 4 5 6
> > 7 8 9
> >
> > I want to select columns 1 and 3 to get
> >
> > 1 3
> > 4 6
> > 7 9
> >
> > It is easy to select the columns via a boolean array and a case in an
> > auto indexing for loop. But I didn't find any way to create an empty
> > array to reassemble the columns. I always get
> >
> > 1 0 3
> > 4 0 6
> > 7 0 9
> >
> > This way the number of columns stays constant. I tried to use a non
> > initialized array constant and an array of length 0 in the false
> > (non selecting) case as a compulsory output. Cheating by using local
> > variables is no clean way of data flow programming.
> >
> > I don't want to reinvent the wheel by reading the data from file as
> > text and chopping it up to provide empty strings in the right
> > places. I have to use the numeric values
afterwards to subtract them
> > from the first row. Read from spreadsheet is the good way of doing it
> > but leads to the trouble with arrays.
> >
> > Is there a clean way of doing it?
> >
> > Johannes Niess