09-12-2016 02:39 PM
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.
Solved! Go to Solution.
09-13-2016 12:22 AM
What different values do you obtain?
09-13-2016 07:32 AM - edited 09-13-2016 07:33 AM
@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?
09-13-2016 07:53 AM
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
09-13-2016 12:13 PM
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.
09-13-2016 12:16 PM - edited 09-13-2016 12:17 PM
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