Randomness of magic function
11 次查看(过去 30 天)
显示 更早的评论
Hi
I'm a bit of a newbie.
I executed the following lines in the console.
a = magic(100)
x = a(37,:)
y = a(81,:)
plot(x, y, 'go', 'LineWidth', 2, 'MarkerFaceColor', 'r', 'MarkerSize', 6)
And here is the plot.

What's with the clustering at the top-left and bottom-right, and the linear nature within those clusters? It's not a problem, just trying to understand how the randomness of the "magic" function works.
Thanks.
0 个评论
采纳的回答
Walter Roberson
2018-4-7
编辑:Walter Roberson
2018-4-7
magic() is not random at all. It always returns the same output for the same input. magic() constructs magic squares
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!