魔方函数Matlab
对于一个项目,我应该编写自己的函数,该函数将执行与 matlab 中的魔术函数相同的操作。我显然不是要求任何人写出我的问题,但如果有人能给我任何关于如何启动它的想法或示例代码,我将不胜感激!我完全不知道如何开始这个......
For a project i am supposed to write my own function that will do the same thing as the magic function in matlab. I am obviously not asking anyone to write out my problem but if somebody could give me any ideas of how i could start it or example code it would be much appreciated! I am completely lost on how to start this one...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这通常是很好的建议:
尝试编写代码来生成 2 x 2 幻方?然后尝试 3 × 3。然后 4 × 4。你能看出如何概括吗?
This is often great advice:
Try to write code to generate a 2 by 2 magic square? Then try 3 by 3. Then 4 by 4. Can you see how to generalise?
我想你已经考虑过了,但通常好的信息来源是维基百科:
https://en.wikipedia.org/wiki/Magic_square#Types_and_construction
它解释了不同的方式制作魔方。
I guess you already thought about it, but the usual good source of information is wikipedia:
https://en.wikipedia.org/wiki/Magic_square#Types_and_construction
It explains different ways of making magic squares.