03-03-2011 04:26 PM
Hello,
I would like to improve my VI. Its something like AB subjective assesment of sound quality. The issue is, that the combination od stimulis must be prepaired as pairs. I would like to code the combinatory in app itself. So the point is to make pair combination of input paths or strings (array) and that combination is without repetition. Mathematicaly its for n files n!/2!*(n-2)!. I started programming that in LV, but it was too complex, more than the main VI. I´ve been doing that for 2 hours and finally I did not accidentaly save it. So now I´m quite upset. But anyway, that code was rubbish. Do you have any idea how to solve that?
Thank you very much!
Solved! Go to Solution.
03-03-2011 05:37 PM
This should work for combinations of two things. This can be extended to solve more than two with recursion. This could be written to run faster, as written there are many array copies being made.
03-04-2011 03:15 AM
I did it exactly like you had posted it. But not working.
03-08-2011 02:52 AM
Hello Kulovy,
I post a working example that might should solve your problem. Please reshape it to fit your application.
Regards, TRSns
03-13-2011 02:44 PM - edited 03-13-2011 02:45 PM
Hello TRSns,
thank you for giving me this idea! It took me quite long time to manage how to do it my way. So here is the result. You can see it´s nothing simple, but maybe it´s not the best way to do it. I know that in sequence languages it would be 5 lines of code or so 😄
03-14-2011 12:03 AM
It would make much more sense to attach a VI or snippet. We cannot debug and judge an image.