CE Home
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Electrical & Electronics Engineering
Notices


Advertisements
Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)
Old 30th October 2008, 06:15 PM
CE - Ambassador
 
durga's Avatar
 
Join Date: 5th October 2008
Location: Sydney
I'm a Crazy Telecommunications Engineer
Posts: 253
Default 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???
__________________
cheers
durga
----------------------------------------------------------------------------------------
mail me @ durga@crazyengineers<dot>com
durga is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)
Old 31st October 2008, 05:45 AM
CE - Ambassador
 
durga's Avatar
 
Join Date: 5th October 2008
Location: Sydney
I'm a Crazy Telecommunications Engineer
Posts: 253
Default Re: matlab error:Subscripted assignment dimension mismatch.

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 ..
__________________
cheers
durga
----------------------------------------------------------------------------------------
mail me @ durga@crazyengineers<dot>com
durga is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
MATLAB - makes life easier for Engineers mastermind303 CE - Labs 16 6th January 2009 02:36 PM
MATLAB: Ultimate Tool xheavenlyx CE - Labs 2 9th January 2007 08:46 PM


All times are GMT +5.5. The time now is 10:38 AM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.

Advertisements