LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

statistics express vi with an array as input

Solved!
Go to solution

I am trying to obtain the statistics of an array of elements, with the statistics express vi. I used the build waveform, in order to connect the array as input to the express vi, but this only uses the last value of the array instead of the sum of all the values of the array.

I am using simple data to make the calculation, so that I know the value before hand.

I use the values 2 and 4 and I am trying to obtain the mean, but I get a wrong value.

Can someone please help?

Thanks in advance.

Download All
0 Kudos
Message 1 of 19
(2,250 Views)

Use Convert to Dynamic Data Type, not Build waveform.

0 Kudos
Message 2 of 19
(2,241 Views)

If I put an array of 2 and 4 into your Express VI, I get a Mean of 3 (correct) and a Std Dev of 1.414 (also correct).  If you are getting some other value, you are doing something very wrong.  Why not try to write the World's Simplest VI, consisting of an Array being initialized to 2 and 4 and your Express VI?  You should get 3 and 1.414 ...

 

Bob Schor

0 Kudos
Message 3 of 19
(2,227 Views)

I made this vi that reads data from a spreadsheet, and makes some stats with it. I am still getting wrong values. Can you please help me out?

 

Download All
0 Kudos
Message 4 of 19
(2,194 Views)

 


I am still getting wrong values

As others pointed out, try first understanding how the Statiscs express.vi takes input and calculates and gives output.

-Try giving simple data as array of 3-4 numbers and try the vi and see how the values are generating for stats.

-What is your input data? There's lot of data in excel, which is your input exactly?

-What is the output values it should be?

-What stats you are looking exactly?

 

Check the example also provided in the help for Static Express.vi

Thanks
uday
0 Kudos
Message 5 of 19
(2,184 Views)

It gives me the right values right now, the thing is that I need to convert those values to string, so I can display them in a table, but I can't convert them to string.

Can you please tell me how to do so, since I tried with all the number to string converters and couldn't make the conversion.

0 Kudos
Message 6 of 19
(2,181 Views)

@Nando88 wrote:

I made this vi that reads data from a spreadsheet, and makes some stats with it. I am still getting wrong values. Can you please help me out?

 


I run your VI and get this.  What do you expect the results to be?

 

One thing I notice is that your data has a header row.  Are you accouting for that that?  You are running your For Loop the same number of times as you have rows.

0 Kudos
Message 7 of 19
(2,175 Views)
I took that into consideration. I just need to be able to convert the values given by the express vi into strings.
0 Kudos
Message 8 of 19
(2,171 Views)

I believe you definitely need to learn about LabVIEW. Please try below free online material :

Start with below links to learn about LabVIEW programming 

NI Learning Center

NI Getting Started

-LabVEW Basics

 

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction

LabVIEW Graphical Programming Course


@Nando88 wrote:

It gives me the right values right now, the thing is that I need to convert those values to string, so I can display them in a table, but I can't convert them to string.

Can you please tell me how to do so, since I tried with all the number to string converters and couldn't make the conversion.


-Care to explain how suddenly they're giving right values?

-What you tried to convert to string?

-Which values are you trying to do conversion?

-What is the data type of values?

-Which functions you tried and not able to make the conversion?

 

 

Thanks
uday
0 Kudos
Message 9 of 19
(2,167 Views)

Look at the string palette and the function "Format into String".

0 Kudos
Message 10 of 19
(2,166 Views)