problem with creat function
Show older comments
hi
can anyone explain to me what i should do i dont where is the problem ?
thats all i know what to do
a = DecodeSyndromeMethod( H, SyndromeTable, Received' );
CodewordEstimates = a';
function CodewordEstimates = blockDecodeSyndromeMethod( H, SyndromeTable, Received )
%Wrapper function, that allows for using
% the existing row-vector oriented DecodeSyndromeMethod function in
% a column block-oriented simulation.
% a for cycle is allowed here
% use the provided function DecodeSyndromeMethod() for your implementation
%the function prototype and helpt text is here:
% CodewordEstimates = DecodeSyndromeMethod( H, SyndromeTable, Received )
% CodewordEstimate = DecodeSyndromeMethod( SyndromeTable, Received )
% decoding of LBC using syndrome method.
% SyndromeTable structure is generated internally if the H matrix is
% submitted as a first parameter instead - DecodeSyndromeMethod autodetects
% the nature of the first argument.
% The second parameter is the set of received GF(2) words to be decoded.
% The codewords set must be stored row-wise in a single matrix.
% The resulting codewords estimated are stored in the same fashion.
4 Comments
Steven Lord
on 17 Oct 2021
This sounds like a homework assignment. If it is, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance.
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.
amjad hammad
on 17 Oct 2021
Edited: Walter Roberson
on 17 Oct 2021
Walter Roberson
on 17 Oct 2021
You have
CodewordsEstimate = blockDecodeSyndromeMethod( SynTable, RXData ); %
Why not pass
CodewordsEstimate = blockDecodeSyndromeMethod(H, SynTable, RXData ); %
??
I don't think I understand what the question is.
amjad hammad
on 18 Oct 2021
Edited: amjad hammad
on 18 Oct 2021
Answers (1)
Walter Roberson
on 18 Oct 2021
Your blockDecodeSyndromeMethod is trying to call DecodeSyndromeMethod with more inputs than DecodeSyndromeMethod wants.
However, we as outside people have no idea what the code for DecodeSyndromeMethod is. It appears to be something you were provided with as part of an assignment.
According to the comments in the blockDecodeSyndromeMethod,
% CodewordEstimates = DecodeSyndromeMethod( H, SyndromeTable, Received )
% CodewordEstimate = DecodeSyndromeMethod( SyndromeTable, Received )
which implies that you should be able to pass three parameters.
But right after that the comments say
% SyndromeTable structure is generated internally if the H matrix is
% submitted as a first parameter instead - DecodeSyndromeMethod autodetects
% the nature of the first argument.
If the SyndromeTable is generated internally if H is provided as the first parameter, then it seems strange that there would be a syntax that permitted passing both H and SyndromeTable . It would seem more likely that the two supported syntaxes were
% CodewordEstimates = DecodeSyndromeMethod( H, Received )
% CodewordEstimate = DecodeSyndromeMethod( SyndromeTable, Received )
You were told that three parameters can be passed but the code provided by the instructors is rejecting three parameters. That is not your fault: you should inform the instructors that their code does not function properly.
But in the meantime, the workaround is probably to call DecodeSyndromeMethod( H, Received )
Categories
Find more on Elementary Math in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!