【发布时间】:2013-06-13 11:11:56
【问题描述】:
我有一个维度为65536x2 的矩阵,我想将它与另一个维度为256x256 一起使用。如何将第一个矩阵维度更改为256x256?我试过reshape如下:
N=reshape(u,256,256);
但是,出现以下错误:
Error using reshape
To RESHAPE the number of elements must not change.
在这种情况下我该怎么办?
谢谢。
编辑
原题提到1x65536,后来发现应该是65536x2
【问题讨论】:
-
使用调试器:
>> dbstop if error并验证numel(u)确实是 65536。
标签: matlab matrix reshape dimension