取消
显示结果 
搜索替代 
您的意思是: 

permutations of a 6! numerically

已解决!
转到解答

Hi John,

 

look for the "Application Control" functions palette. "Open VI Reference" and "Call by Reference" might be interesting...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 项奖励
31 条消息(共 57 条)
3,121 次查看

Can recursion be used for this challenge wiht LV 8.2?

 

Somewhere in there we picked-up the option to share clones but without that option, it may blow-up in LV 8.2 due to a lack of memory.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 项奖励
32 条消息(共 57 条)
3,099 次查看

What would be wrong with just using a while loop that counts to 1000000. Convert each iteration to a string, filter out any number with [0,7-9], then do a simple search and replace (1=A, 2=B, etc).

 

Of course, it gives you repeat letters and lengths shorter than 6, but those should be easily filtered as well.

 

Not elegant or super fast (takes a few seconds to build it to an array, didn't try writing directly to a file), but certainly easy.

33 条消息(共 57 条)
3,081 次查看

Its simple, and the filtering would be straight forward,

its not elegant but that would work.

 

hmm, nice idea. And it would be easy to see if it worked, run a line count compare to n! for that number and check for repeats and remove.

 

That might just do it.

 

I'll give it a go! 😄

0 项奖励
34 条消息(共 57 条)
3,069 次查看

Here's a quick modification (LabVIEW 8.0), adapted from this much more complex problem. 😉

 

 

35 条消息(共 57 条)
3,063 次查看

... and here is the same using plain strings:

 

下载全部
36 条消息(共 57 条)
3,047 次查看

sweet, here's hoping it'll run on LV v8.2 😄

0 项奖励
37 条消息(共 57 条)
3,042 次查看

Sorry, down-conversion to 8.0 will get rid of the in-place structure, so the attached 8.0 VI is a bit ugly. To simplify, you can remove the inner while loop without breaking anything.

 

Here's the string version as a 2009 VI for those who upgraded.

 

0 项奖励
38 条消息(共 57 条)
3,036 次查看
解答
接受人 John Pierson

 

Here is a cleaned up 8.0 version:

 

 

of course you need to be careful. Don't use very long strings or it will break because of datatype limitations. 😉

39 条消息(共 57 条)
3,029 次查看

yup, that does the job perfectly, can even be expanded for 7, 8 etc... itterations.

does waht i needed and more 😄

 

now to write to a notpad file 😄

0 项奖励
40 条消息(共 57 条)
3,024 次查看