LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strings adding zero's to arrays

I have a program that arranges 4 arrays which consist of columns of 10
data points from each iteration of the program. The final program puts
these sets of 10 pts into one long column. I converted the array into a
spreadsheet string. I used the match pattern to find and replace the new
line characters and returns with tabs. Each column has 10 data
points, then one zero separating them from the next 10 points. I've
tried the same idea using backspace, form feed, space characters, etc,
and I still have one row of zeros separating my data points. Does
anyone have any idea what this character could be or how to fix this? I
tried all of the characters in the manuals and none will get rid of this
problem.

Heather


Sent vi
a Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 4
(3,018 Views)
Hi Heather

I could be totally on the wrong track - apologies if that is so.

Is it possible that your zeros (0) are in fact squares? Like this:  If
you are using Windows, then a line break is 2 characters - a
carriage-return plus a line-feed, and so the "zeros" you are seeing are in
fact the line-feed characters that remain after removing/replacing the
carriage-return characters

Paul

hmmille@my-deja.com wrote:

> I have a program that arranges 4 arrays which consist of columns of 10
> data points from each iteration of the program. The final program puts
> these sets of 10 pts into one long column. I converted the array into a
> spreadsheet string. I used the match pattern to find and replace the new
> line characters and returns with tabs. Each column has 10
data
> points, then one zero separating them from the next 10 points. I've
> tried the same idea using backspace, form feed, space characters, etc,
> and I still have one row of zeros separating my data points. Does
> anyone have any idea what this character could be or how to fix this? I
> tried all of the characters in the manuals and none will get rid of this
> problem.
>
> Heather
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

--

Research Assistant
School of Physiotherapy, Curtin University of Technology
Selby Street, Shenton Park, Western Australia, Australia. 6008
email: P.C.Davey@curtin.edu.au
Tel. +61 8 9266 4657 Fax. +61 8 9266 3699

"Everyone who calls on the name of the Lord will be saved." Romans 10:12
"For all have sinned and fall short of the glory of God, and are justified
freely by his grace through the redemption that came by Christ Jesus."
Romans 3:23-4
0 Kudos
Message 2 of 4
(3,018 Views)
The poster who suggested the "zeroes" could be squares- signifying a
non-printable character, may be on the right track.

However, it occurs to me that you're using quite an unwieldy way of tackling
a simple problem- and that the way you're using is unnecessarily platform
dependent and complicated by the need to handle a return and a linefeed.

I'm not quite sure how your arrays are arranged- as four discreet arrays?

If it's four separate arrays with 10 points and you want one big array, you
can use the "build array" function. If you pop up the right mouse button
menu over this, you see an option to change an input from an element to an
array. If you make a "build array" with four array inputs, what you get out
is one long 1D array with the four sets of data appended one after the
other. If you then want the output as one long column, a useful trick is to
feed your new array into another "build array" node, this time with only a
single "element" input. This promotes the 1D array to a single column 2D
array, that you can then feed through a "transpose 2D array" and then into a
"build spreadsheet string" to generate your output string without having to
do all the search and replace operations. You may or may not need the
"transpose 2D array", depending on how the file turns out- I tend to simply
do things like this without thinking them through and then tweak them to
make them work- which I find quicker than going through all the details in
advance.


wrote in message news:8m9og0$64m$1@nnrp1.deja.com...
> I have a program that arranges 4 arrays which consist of columns of 10
> data points from each iteration of the program. The final program puts
> these sets of 10 pts into one long column. I converted the array into a
> spreadsheet string. I used the match pattern to find and replace the new
> line characters and returns with tabs. Each column has 10 data
> points, then one zero separating them from the next 10 points. I've
> tried the same idea using backspace, form feed, space characters, etc,
> and I still have one row of zeros separating my data points. Does
> anyone have any idea what this character could be or how to fix this? I
> tried all of the characters in the manuals and none will get rid of this
> problem.
>
> Heather
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
0 Kudos
Message 3 of 4
(3,018 Views)
Hello again Heather,

If you open your Spreadsheet String into an indicator, then set the view
type on the indicator to show /codes (rightclick then choose 'control code
view' or something similar), this will show you if the character is really a
zero or an unprintable. (lol...we know it's an 'unprintable' character
either way, right?)

Paul
hmmille@my-deja.com wrote in message <8m9og0$64m$1@nnrp1.deja.com>...
> I have a program that arranges 4 arrays which consist of columns of 10
>data points from each iteration of the program. The final program puts
>these sets of 10 pts into one long column. I converted the array into a
>spreadsheet string. I used the match pattern to find and replace the new
>line characters and returns with tabs. Each column has 10 data
>points,
then one zero separating them from the next 10 points. I've
>tried the same idea using backspace, form feed, space characters, etc,
>and I still have one row of zeros separating my data points. Does
>anyone have any idea what this character could be or how to fix this? I
>tried all of the characters in the manuals and none will get rid of this
>problem.
>
> Heather
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
0 Kudos
Message 4 of 4
(3,018 Views)