View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12915 Members
Join this group to post and comment.
durga ch
durga ch • Oct 30, 2008

matlab error:Subscripted assignment dimension mismatch.

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???
durga ch
durga ch • 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 .. 😀

Share this content on your social channels -