我正在编写一个脚本,我需要使用reshape命令。
这是我的代码:
Bit_Num=4;
FFT_Num=64;
Carrier_Num=48;
OFDM_per_Symbol=1;
CP=16;
LI=12 ;
Np=4; % Number of pilot
Carriers=1:Carrier_Num+Np;
N_Num=Bit_Num*Carrier_Num*OFDM_per_Symbol;
BitTx=randi(1,N_Num);
N_Num=length(BitTx);
SymQAMtmp=reshape(BitTx,4,N_Num/4).';
我是用Matlab2015编写的,没问题。然而,我需要在Matlab 2017中运行我的代码。
我得到了这个错误:
Error using reshape
To RESHAPE the number of elements must not change.
有人能帮我解决这个问题吗?
发布于 2018-03-04 08:50:50
你应该读一读“兰迪是如何工作的”。输入'help randi‘查看randi(1,N_Num)生成包含所有元素'1’的N_Num x N_Num矩阵。
https://stackoverflow.com/questions/49093544
复制相似问题