please check the following code in shown the error
1 回表示 (過去 30 日間)
古いコメントを表示
clc;
clear all;
close all;
K=5;
M=100:100:1000;
q=10;
s = 0 + q.*randn(K,1);
v = s/10;
si=10.^v;
d=randi([10 50],K,1);
u=1;
a=2.0;
z=(d.^a);
%flat fading channel matrix
for k=1:K
b(k)=(1*si(k))/z(k);
end
D=diag(sqrt(b));
for t=1:10
H(t) = rand(M(t),K) + i*rand(M(t),K);
end
for y=1:10
G(y)=H(y) * D
end
0 件のコメント
回答 (1 件)
Roger Stafford
2018 年 3 月 9 日
It looks to me as though the line
H(t) = rand(M(t),K) + i*rand(M(t),K);
is in error. On the first trip through that for-loop, you are trying to stuff a 100 x 5 matrix into what appears to be a scalar location in vector H. How do you expect it to fit? Better think that step over again more carefully.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!