档案交换一周

我们最好的用户提交

All combinations from vectors

我的同事用MATLAB问走进我的办公室uestion, a regular pasttime for us here at the MathWorks. He wanted to take every combination of one value from each of three distinct vectors. Now, this could be done easily with some nested for loops, but that really does violate the spirit in which such challenges are issued. I did not know of a function in MATLAB that did that, but I figured someone had invented that wheel before, so off to the File Exchange. A few minutes later I remembered the difference between combinations and permutations and had found two great new picks for this week.

排列:一个很棒的小文件,包含已发布的文档,它将找到所有带有很多选项的排列。
组合:另一个伟大的小型公用事业,回答了我同事的挑战。很高兴看到作者乔斯(Jos)跟进了审稿人的评论,并对文件进行了一些很好的增强。

|
  • 打印
  • 发送电子邮件

Comments

要发表评论,请单击这里登录您的数学帐户或创建一个新帐户。