annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

Read in Labview from txt file (or mat file)

Risolto!
Vai alla soluzione

Hi,  I have some data in Matlab, specifically a column vector. it is a series of numbers indicating the distance of an object like this:

    .......
    3.2886
    3.2886
    3.2464
    3.2464
    3.2464
    3.2464
    3.2464
   -1.0000
   -1.0000
    ..........

where the number -1 indicates the distance is unknown. By the way I have to bring these numbers in Labview.
First I saved these numbers as a txt file:

 

   1.6473000e+00
   1.6473000e+00
   1.6473000e+00
  -1.0000000e+00
  -1.0000000e+00
  -1.0000000e+00

and then I read it in Labview as a string:

Immagine.png

 

but I am not really convinced this is the best approach, how can I do?
I would like to have the same structure of an array in Labview as well

0 Kudos
Messaggio 1 di 3
3.168Visualizzazioni
Soluzione
Accettato da autore argomento micheleG_Unipd

Hi Michele,

 

use ReadFromSpreadsheetFile instead, it will give you an array of floats instead of a simple string!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Messaggio 2 di 3
3.164Visualizzazioni

Thank you! It is so easy in this way: D

0 Kudos
Messaggio 3 di 3
3.155Visualizzazioni