フィルターのクリア

I am executing the following code to realize 2X2 MIMO using comm.MIMOchannel system object. In the last line the variables chan_out and chan_out1 are having different outputs even though the instructions are same. Please help me rectifying the error

5 ビュー (過去 30 日間)
Nt=2;Nr=2;
inpt=randi([0 1],Nt,3);
hchan = comm.MIMOChannel(...
'SpatialCorrelation',false, ...
'NumTransmitAntennas',Nt, ...
'NumReceiveAntennas',Nr);
chan_out=step(hchan,inpt');
chan_out1=step(hchan,inpt');

採用された回答

Walter Roberson
Walter Roberson 2016 年 11 月 2 日
You are applying step() to the same system both times. After you step() the first time, its state changes so the next step() produces different output.
  3 件のコメント
Walter Roberson
Walter Roberson 2016 年 11 月 2 日
Nt = 2; Nr = 2;
inpt = randi([0 1],Nt,3);
hchan = comm.MIMOChannel(...
'SpatialCorrelation',false, ...
'NumTransmitAntennas',Nt, ...
'NumReceiveAntennas',Nr);
chan_out = step(hchan, inpt');
reset(hchan)
chan_out1 = step(hchan, inpt');
It is unlike that you want to do this. step is defined as:
"Call step to filter the input signal through a MIMO multipath fading channel according to the properties of comm.MIMOChannel. The behavior of step is specific to each object in the toolbox."
The channel is intended to update after each step; the result of applying step() one sample (per channel) at a time should be the same as if you passed in an array of samples.
MIMOChannels use random number generation. To be sure you get the same result each time, you also need to deal with the random number seed. Please read https://www.mathworks.com/help/comm/ref/comm.mimochannel.reset.html
RAGHAVENDRA
RAGHAVENDRA 2016 年 11 月 2 日
Thank you very much for the help. I have understood now. Followed the procedure in the link and have done the required changes as mentioned. I am getting the desired output.

サインインしてコメントする。

その他の回答 (1 件)

thirumalraj karthikeyan
thirumalraj karthikeyan 2017 年 10 月 26 日
i have use this code...its very use full but i have problem in ...Nt = 4; Nr = 4;...any ideas to moreover this problem

カテゴリ

Help Center および File ExchangeFilter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by