如何在MATLAB中将X={x1,x2,x3}映射到二维空间

你问的东西, 我可以理解为把一维数组看成二维数组吗?
如果是, 我简单说,你借鉴:
int MyList[6]={1, 2, 3, 4, 5, 6}; //一维数组 6个元素
int (*pList)[3] = (int(*)[3])MyList ; //建立二维指针 被赋予 一维数组地址.
cout <<pList[0][1]<<" "<<pList[1][2]<<endl; //测试追问

在MATLAB里面如何输入。这个输进去没法运行。

追答

呵呵:
int MyList[6]; //建立数组

scanf("%d %d", MyList, MyList+1); //输入 MyList的前两个元素
//scanf("%d %d", &MyList[0], &MyList[1]);

温馨提示:答案为网友推荐,仅供参考
相似回答