我正在尝试将数据集导入 Mathematica。问题是我不能将导入的数据作为 Mathematica 中的常规数字。它们作为“列表”导入。所以,我不能在我需要的方程式中使用它们:
Import["out.dat", "Data"]
{{5.7, 4.3}, {-1.2, 7.8}}
Array[cc, {2, 2}]
For[i = 1, i <= 2, i++,
For[j = 1, j <= 2, j++,
cc[i, j] = Take[Import["out.dat", {"Data", i}], {j, j}]]]
现在,我需要c[1,1]
,5.7
但{5.7}
正如你所见:
cc[1, 1]
{5.7}