【发布时间】:2012-01-04 05:39:05
【问题描述】:
我在 Mathematica 中遇到了这个问题:
L=16;
f[x_]:=-x;
mlat = Table[2 RandomInteger[] - 1, {L}, {L}];
ArrayPlot[mlat, ColorFunction -> (If[# == 1, White, Black] &), Mesh -> All]
我在 Matlab 中做了这个:
L=16;
f=@ (x) -x;
mlat=2*randint(L,L)-1;
if mlat(:,:)==1
plot(mlat,'ws')
hold on
else
plot(mlat,'ks')
hold off
grid on
end
但我无法得到图表。
【问题讨论】:
-
我不知道 Mathematica,你的图表应该是什么样子的?
-
ising 模型,应该有正方形,白色和黑色。
-
@Ghaul:查看Mathematica help中的示例
标签: matlab wolfram-mathematica plot