Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我有以下代码
A = squeeze(hourly_surplus(1,1,1,:)); B = reshape(A,365,24);
其中尺寸(A)= 8760 x 1
但是我得到了错误
Error using reshape To RESHAPE the number of elements must not change
这个错误出现在“B”行,但是我认为 A 有 8760 个元素,B = 365 x 24 也是 8760。可能出了什么问题?
谢谢
这个:
A=rand(8760,1); B=reshape(A,365,24);
工作正常,所以问题出在你的 A.