LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Statistical analysis not returning correct values

Solved!
Go to solution

I am performing some statistical analysis on two 1D arrays. I am sending these arrays as input for each of the statistical analysis VIs. The thing is that when I check with another stat software, I obtain different values, so I must be doing something wrong.

Can someone please help?

Thanks.

0 Kudos
Message 1 of 6
(2,896 Views)

What different values do you obtain?

0 Kudos
Message 2 of 6
(2,838 Views)

@Nando88 wrote:

I am performing some statistical analysis on two 1D arrays. I am sending these arrays as input for each of the statistical analysis VIs. The thing is that when I check with another stat software, I obtain different values, so I must be doing something wrong.

Can someone please help?

Thanks.


Sorry but this VI is just a big mess. Almost impossible to follow what you try to do. You should really learn how to use subVIs, and how to program a proper state machine. Usage of that Event Structure does not make too much sense, and as I see your While loop is set to run forever, and you stop your VI via the Abort Execution button which is a bad practice for many reasons. That Flat Sequence Structure is also a good indication of "bad design". You might find this link useful:

http://www.ni.com/newsletter/51735/en/

 

Regarding to the actual problem what you ask about, you should provide a smaller example VI with data saved with it as input in a control, or provide your measurement file at least. So we could test what is your input data, and what is the output. Also, tell us what "other stat software" you used?

0 Kudos
Message 3 of 6
(2,827 Views)
Solution
Accepted by topic author Nando88

I agree with Blokk that it is impossible extremely difficult to see what you are doing with this code, and to "verify" that the statistical results returned by LabVIEW are "wrong".  I'll note that you also claimed that LabVIEW returned the "wrong" results when using an array of numbers, but I got absolutely the correct values when I tried a (very simple) example using the functions you said were "wrong".

 

Is it possible that LabVIEW is, in fact, giving the correct results, but you either don't understand the statistics involved, or don't have a good grasp of the input data being analyzed?

 

I strongly recommend that you write some simple example code, with known (and simple) input data to examine the results of LabVIEW Statistical routines.  I suspect that you will (probably) find that they give the right answer.  If you do find a discrepancy, and have a simple example to show us, we will (of course) be very interested ...

 

Bob Schor

0 Kudos
Message 4 of 6
(2,818 Views)

I fixed the problem of receiving incorrect values. The problem ocurred when I tried to convert the values into a string. I am now using the stistics express vi and I am obtaining the correct values as numbers, but I wish to convert them into strings. I used the number to decimal string, but was not able to do so. Can someone please help me with this conversion.

Thanks in advance.

0 Kudos
Message 5 of 6
(2,792 Views)

For some reason, this wound up in two separate threads.

 

Let's keep the conversation in the newer thread where the latest messages have been given.

http://forums.ni.com/t5/LabVIEW/statistics-express-vi-with-an-array-as-input/m-p/3345754#U3345754

0 Kudos
Message 6 of 6
(2,789 Views)