フィルターのクリア

Use objects of class 'comm.Rais​edCosineRe​ceiveFilte​r' only as scalars or use a cell array.

3 ビュー (過去 30 日間)
Hi i am trying to run the following code but it is showing this error, can anybody tell me how to resolve this issue.
Array formation and parentheses-style indexing with objects of class 'comm.RaisedCosineReceiveFilter' is not allowed. Use objects of class 'comm.RaisedCosineReceiveFilter' only as scalars or use a cell array. Error in matchfilter (line 42) txSym = qam16Mod(b);
Following is the code i am trying to run
%Initialization %First, initialize variables that define simulation parameters, such as carrier frequency, number of samples representing a symbol, and noise level.
Fc = 2.5e6; % Carrier frequency (Hz) Rsym = 1e6; % Symbol rate (symbols/second) nSamps = 8; % Number of samples per symbol frameLength = 2048; % Number of symbols in a frame M = 16; % Modulation order (16-QAM) EbNo = 15; % Ratio of baseband bit energy % to noise power spectral density (dB)
% Calculate sampling frequency in Hz Fs = Rsym * nSamps;
% Calculate passband SNR in dB. The noise variance of the baseband signal % is double that of the corresponding bandpass signal [1]. Increase the SNR % value by 10*log10(2) dB to account for this difference and have % equivalent baseband and passband performance. SNR = EbNo + 10*log10(log2(M)/nSamps) + 10*log10(2);
%% % Initialize Measurement Tools % Initialize a constellation diagram to analyze signals at different points in the transmitter-receiver chain. % Create a constellation diagram for received symbols. constDiag = comm.ConstellationDiagram('SamplesPerSymbol', 1, 'XLimits', [-4.5 4.5], 'YLimits', [-4.5 4.5], 'Position', [70 560 640 460]); %% % Baseband Modulation % The first step of simulating a passband communication system is to modulate the random data in the baseband. You generate random symbols, modulate them with a 16-QAM modulator, and apply pulse shaping using a square root raised cosine filter.
% 16-QAM Modulation
% Create a 16-QAM modulator. qam16Mod = comm.RectangularQAMModulator(M);
% Set the expected constellation of the constellation diagram. constDiag.ReferenceConstellation = constellation(qam16Mod);
% Generate random data symbols. b = randi([0 M-1], frameLength, 1);
% Modulate the random data. txSym = qam16Mod(b); %% % Pulse Shaping
% After modulation, you apply pulse shaping using a square root raised cosine filter. You use the spectrum estimator to verify that the frequency spectrum of the baseband signal is centered at zero Hz, and that it has been filtered properly.
% Specify a square root raised cosine filter with a filter length of eight % symbols and a rolloff factor of 0.2. nSym = 8; % Length of the filter in symbols beta = 0.2; % Rolloff factor
% Design the transmitter filter. Apply a gain to normalize passband gain to % unity. rctFilt = comm.RaisedCosineTransmitFilter('RolloffFactor', 0.2, 'OutputSamplesPerSymbol', nSamps, 'FilterSpanInSymbols', nSym, 'Gain', 0.3578);
% Apply pulse shaping by upsampling and filtering. Alternatively, you can % use an efficient multirate filter. See help for fdesign.interpolator for % more information. x = rctFilt(txSym);
% Plot spectrum estimate of pulse shaped signal. Fig = figure; pwelch(x,hamming(512),[],[],Fs,'centered')

回答 (1 件)

Paul Ferrera
Paul Ferrera 2017 年 9 月 3 日
Possibly you have tried to use something like
obj = comm.PhaseNoise();
result = obj(some_data);
That syntax is valid only from R2016b onward. For previous versions, you need
result = step(obj, some_data);

カテゴリ

Help Center および File ExchangeTransmitters and Receivers についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by