06-26-2009 09:07 AM
Dear All
I am trying to work with "mode" subVI to estimate the mode of an input array which seems very obvious application. When I set the interval input to zero I would expect to have:
1) In case of an array with one single element the output would be the same single value
2) In case of an array with two entries the output would be one of these two
But apparently it does not work like that and even with an array with single element it returns "NaN".
I read the help file but it does not say anything about that.
Has anybody any comment?
Best regards
Afshin
06-26-2009 10:31 AM
well the mode is the number that appears most frequant here is a vi I made...
06-26-2009 11:00 AM - edited 06-26-2009 11:01 AM
Looking at your VI, I see NI made a spelling mistake on that Mode VI.
What happened to the "L" in multimodal?
06-26-2009 11:03 AM
I think it got absorbed by the round to nearest value funtion.
Felix
06-26-2009 11:09 AM
06-26-2009 11:53 AM
Ravens Fan wrote:Looking at your VI, I see NI made a spelling mistake on that Mode VI.
What happened to the "L" in multimodal?
This was reported to R&D (CAR 176914). Thanks for pointing it out.
Chris M
06-26-2009 11:57 AM
Af_Dk wrote:But apparently it does not work like that and even with an array with single element it returns "NaN".
This seems to be a bug. The first time it runs with a single element array input, the result is NaN. however, if you add a second element, run for a valid result, then run again with an array of size 1, the result is no longer NaN, but a cached result that no longer depends on the actual value of the single array element.
06-26-2009 02:09 PM
Dear all
thank you all for your responses but I could not open your file because I use LV 8.2 and it is not compatible with that. Secondly I don't think taking a round off is a good idea because the output may not be included in the input array but the mode should be one of the elements in the array.
I also agree that this "mode" subVI is not working properly so if any one is supposed to report that to some where please report it.
Best regards
Afshin