cell定义:
num_BS=2;
num_user=2;
d_b=cell(num_user,num_BS)
for k=1:num_BS
for j=1:num_user
d_b{k,j}=(1/sqrt(2)*(k*ones(2)+j*ones(2)));
end
end
多维矩阵定义:
num_BS=2;
num_user=2;
for k=1:num_BS
for j=1:num_user
d(:,:,k,j)=(1/sqrt(2)*(k*ones(2)+j*ones(2)));
end
end
感觉上多维矩阵更方便点