Unable to resolve the name 'comm.PolarEncoder'.

조회 수: 4 (최근 30일)
Ali Al raeesi
Ali Al raeesi 2023년 4월 5일
편집: Walter Roberson 2023년 4월 6일
% Set the polar code parameters
N = 1024; % Code length
K = 512; % Message length
SNR = 2; % Signal-to-Noise Ratio (dB)
% Generate a random message bit sequence
message = randi([0 1],K,1);
% Encode the message using a polar code
encoder = comm.PolarEncoder(N,K);
codedBits = encoder(message);
% Add AWGN noise to the coded bits
noisyCodedBits = awgn(codedBits,SNR,'measured');
% Decode the noisy coded bits using a polar code
decoder = comm.PolarDecoder(N,K);
decodedBits = decoder(noisyCodedBits);
% Compute the bit error rate
ber = sum(xor(message,decodedBits))/K;
% Display the results
disp(['Message Length: ' num2str(K)]);
disp(['Code Length: ' num2str(N)]);
disp(['SNR: ' num2str(SNR) ' dB']);
disp(['Bit Error Rate: ' num2str(ber)]);
Unable to resolve the name 'comm.PolarEncoder'.
Error in polarcodeparameters (line 10)
encoder = comm.PolarEncoder(N,K);

답변 (1개)

Walter Roberson
Walter Roberson 2023년 4월 5일
I do not find any reference to functions with those names, not anywhere.
The 5G Toolbox has nrPolarEncoder and nrPolarDecoder, but not comm.PolarEncoder or comm.PolarDecoder .
The names suggest something in the Communications Systms toolbox, but I find no evidence that functions with those names ever existed.
  댓글 수: 4
Ali Al raeesi
Ali Al raeesi 2023년 4월 6일
i already downloaded the 5G toolbox and it sitll not working
is there somthin i must do
Walter Roberson
Walter Roberson 2023년 4월 6일
편집: Walter Roberson 2023년 4월 6일
Sorry I had the name slightly wrong
https://www.mathworks.com/help/5g/ref/nrpolarencode.html

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by