matlab error:Subscripted assignment dimension mismatch.

durga ch

durga ch

@durga-TpX3gO Oct 24, 2024
now i am confused.
i tried passing a BPSK signal through a convolutional encoder through trellis .
but trellis accpets only binary so it rejected my BPSK input 😔

so i positioned the trellis inbetween the data signal(binary) and the BPSK generator.

i was thinking that encoding is encoding where ever i do.. but still it dint work.

I dont know.. not very good at matlab.😔

partial code posted:

%creation of input signals
for i=1:32
message(i,1)=round(rand());
end;
%encoding the signal
trellis=poly2trellis(3,[5 7]);
coded=convenc(message,trellis);

% Create input BPSK signal
for i=1:64
input(i,1) = (2*coded)-1;
end

the error while running this code is"Subscripted assignment dimension mismatch."

I did Google and tried debugging... but invain

can anyone help me out???

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • durga ch

    durga ch

    @durga-TpX3gO Oct 30, 2008

    gotcha!!!

    the 'iput' was a function call and i was trying to use it as a variable so it dont work
    i changed it to
    input[];
    %creation of input signals
    for i=1:32
    message(i,1)=round(rand());
    end;
    %encoding the signal
    trellis=poly2trellis(3,[5 7]);
    coded=convenc(message,trellis);

    % Create input BPSK signal
    for i=1:64
    input(i,1) = (2*coded)-1;
    end


    and it worked .. 😀