asking about the error in my code

1 回表示 (過去 30 日間)
Shadwa
Shadwa 2022 年 11 月 11 日
回答済み: Jan 2022 年 11 月 11 日
Ts=1e-4; % sampling time in second
Fd=100; % doppler frequency in Hz
Tau=[0 1.5e-4 2.5e-4]; % delay for the three paths
PdB=[0, -2, -6]; % power in each of the three paths
X=ones(1,5e4);
% Rayleigh channel model
rayleighchan = comm.RayleighChannel('SampleRate' ,4);
Chan= rayleighchan(Ts,Fd,Tau,PdB);
Error using ()
Too many input arguments. Expected 1 (in addition to System object), got 4.
chan.StoreHistory = true;
Y = filter(h, X);
Z = filter(h, Tx_Packet); % passing baseband IQ vector through rayleigh channel
figure;plot(h);
figure;plot(abs(Tx_Packet)); title('baseband IQ packet without rayleigh channel');
figure;plot(abs(Z)); title('baseband IQ packet with rayleigh channel');
figure;plot(abs(Y)); title('baseband IQ of all ones after passing through rayleigh channel');

回答 (1 件)

Jan
Jan 2022 年 11 月 11 日
The error message tells, that this object does not accept 4 inputs. See also the corresponding documentation.
What is the purpose of providing the inputs Ts,Fd,Tau,PdB ?

カテゴリ

Help Center および File ExchangePropagation and Channel Models についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by