From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert data in the text file to table in DBL

well.

because all of my data from the text i read contains of some values, implies they won't be zero.

By using mike.vi, it consists of 0.00 value in my labview table.

How is this so?

0 Kudos
Message 21 of 30
(1,063 Views)

Hi sean1985,

if you have an empty string and you convert it to a dbl, you will get "0.00". And because of there are some empty fields in your file, you get all the "0.00" values.

Mike

0 Kudos
Message 22 of 30
(1,059 Views)
because some of my data from my .txt is positive. Thus some of the data in the table of labview is 0.00
0 Kudos
Message 23 of 30
(1,041 Views)

mike,

i have alter some changes previously to \s\s. \s\s format will contribute to a column of 0.00 in my table

whereas \s\s\s cannot read in positive values (because there will be no sign) which then treat it as empty field, and in terms output as 0.00

0 Kudos
Message 24 of 30
(1,039 Views)

Hi sean1985,

there is only one empty field. If you read your data as 1D array and delete the first elements, then you have 1024 elements in your array. You can create a table of it with the reshape array function. See the attached picture.

Hope it helps.

Mike



Message Edited by MikeS81 on 05-22-2008 07:53 AM
Message 25 of 30
(1,024 Views)

Mike! U have defintely proved yourself as a veteran... Why cant i thought of this?

Anyway thks for ur patience and time

Furthermore, if possible can go n see my post at labview math script..lolx....... pls!!!!!!!!

 

Why u, because, i got addicted to ur way of teaching..lolx!!

0 Kudos
Message 26 of 30
(1,002 Views)
i think i made some error somewhere. i dun get it.
0 Kudos
Message 27 of 30
(973 Views)
In all of your string constants where you have \s, the display mode is not correct. Right click and select '\' Codes Display (and then reenter the correct data). A \s is the '\' Code way to enter a space character. You could leave the string constants in normal display and simply enter the correct number of spaces by hitting the space bar but using the '\' code display makes it easier to just look at the diagram and see how many spaces are being used.
Message 28 of 30
(971 Views)
what is "\s\s " means? \s\s means 2 spacing? where can learnt more about this notation. I never seen it before? can u direct me?
 
 
0 Kudos
Message 29 of 30
(952 Views)
Hi Sean,

open Labview help, go to Index tab, search for "Backslash" and choose the only one entry for this topic...

Can also be found via "format specifier syntax" and clicking "insert non-displayable characters in strings" (last paragraph). "Format specifier syntax" is linked in help of all string-formatting functions.


Message Edited by GerdW on 05-24-2008 09:48 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 30 of 30
(949 Views)