LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: convert string to number

hello to everyone,
I would like to know if you can help me I am reading some data from several sensors by the serial port and I need to put them in an array and then separate them by arrays in columns data by data and then click each position of the array by a value and add that is in order to replace an equation.

I mean I have y= 0,0034*(dato1)+0,975*(dato2)+0,4521*(dato3)+0,1234*(dato4)+1.935*(dato5)
where the data are the values that come in through the
and also I need that when I calculate each data of and save it in a matrix
I hope you can please help me because it is a matter of passing a subject.
thank you

Translated with www.DeepL.com/Translator (free version)

anamariag2410_0-1605931782655.png

 

0 Kudos
Message 1 of 2
(283 Views)
  • You get better help if you attach a VI instead of a picture.
  • How does the received string look like?
  • You cannot do math on string, so you need a numeric datatype.
  • Once you have your array of [dato1..5], multiply it with an array constant of [0.0034, 0.975, etc] then take the sum to get y.
  • You don't want a "matrix" unless you do linear algebra. Just use a 2D array.

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 2
(251 Views)