我已将矩阵数据
x=[0.30,0.80,0.20 0.28,0.90,0.70 0.24,0.70,0.10;
0.29,0.75,0.10 0.27,0.85,0.80 0.25,0.80,0.10;
0.30,0.60,0.10 0.27,0.70,0.80 0.26,0.60,0.10;
0.33,0.80,0.15 0.25,0.85,0.75 0.22,0.75,0.10;
0.35,0.50,0.05 0.30,0.60,0.90 0.28,0.55,0.05;
0.33,0.58,0.10 0.30,0.74,0.80 0.27,0.64,0.10;
0.30,0.55,0.05 0.26,0.78,0.90 0.24,0.60,0.05;
0.26,0.85,0.08 0.24,0.90,0.90 0.20,0.70,0.02;
0.33,0.65,0.10 0.26,0.80,0.80 0.23,0.50,0.10;
0.34,0.68,0.15 0.29,0.75,0.80 0.26,0.55,0.05;
0.34,0.60,0.05 0.30,0.75,0.90 0.27,0.55,0.05;
0.32,0.55,0.10 0.31,0.75,0.75 0.28,0.70,0.15;
0.27,0.90,0.05 0.25,0.99,0.90 0.23,0.90,0.05;
0.30,0.89,0.15 0.28,0.95,0.75 0.24,0.90,0.10;
0.34,0.90,0.05 0.29,0.98,0.80 0.26,0.90,0.15]
建立在了一个名为data的m文件中。
现想在程序中调用data文件数据,并将数据中x赋值给另一
变量y,即使得y=x。
我用了如下命令:
filename=input('输入数据所在的文件名','s');
y=load(filename)
输出结果为y=
x: [15x9 double]
可是调用y(2,5)时,输出??? Index exceeds matrix dimensions. 我想要输出y(2,5)=0.85
请问问题出在哪里? |