Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

matlab symbolmapping- receive error message

Status
Not open for further replies.

Aya2002

Advanced Member level 4
Joined
Dec 12, 2006
Messages
1,140
Helped
184
Reputation
376
Reaction score
117
Trophy points
1,343
Location
Iraq
Activity points
8,006
matlab symbolmapping

Hi experts,
i received this error message

??? Error using ==> feval
Error using ==> modem.abstractMod.checkModInputSizeBit at 13
Number of elements in each channel of input X must be an integer multiple of log2(M).

when i run the following code in matlab

clc;clear all;close all;
Tu=224e-6; %useful ofdm symbol period.
T=Tu/2048; % base band elementary period.
Kmax=1705; % number of subcarriers.
FS=4096; % IFFT/FFT length.
%%
%-------------------------------------------------
M=Kmax+1;
Data=randint(M,1,2); %Binary Data of Kmax+1=1706.
Datainp=modulate(modem.pskmod('M',8,'SymbolOrder','binary','InputType','bit'),Data);
figure(1);
subplot(211);
stem(Data(1:20));
title('Input Data');
subplot(212);
stem(real(Datainp(1:20)));
title('BPSK modulated data');

can someone explain what is the problem?

Thanks in advance
 

polishing carrier matlab

I am looking at the help file for modulate, and I think you are passing it the arguments incorrectly.

modem.pskmod('M',8,'SymbolOrder','binary','InputType','bit'),

works just fine, and gives you
Type: 'PSK Modulator'
M: 8
PhaseOffset: 0
Constellation: [1x8 double]
SymbolOrder: 'Binary'
SymbolMapping: [0 1 2 3 4 5 6 7]
InputType: 'Bit'


And you are trying to pass the object directly as an input to 'modulate', which asks for input in the form:

y = modulate(x, fc, fs), where x is the data to be modulated, fc is the carrier freqiency, and fs is the sampling rate
 

    Aya2002

    Points: 2
    Helpful Answer Positive Rating
Matlab problem

can you explaine more please?
 

Matlab problem

any reply please?
 

Matlab problem

Sorry, I can't figure out how to get this working.
 

    Aya2002

    Points: 2
    Helpful Answer Positive Rating
Matlab problem

realy i need your help please, let us do step by step invistigation together

Added after 1 hours 2 minutes:

In fact, when i use 4 or 2 in the modulate command, i can see the correct results but more than 4 i.e. 8, 16, 32.... i receive the mentioned problem. Can you analyse ?

Datainp=modulate(modem.pskmod('M',4,'SymbolOrder','binary','InputType','bit'),Data);

Added after 21 minutes:

Hi Freinds,
Thank you too much. I solved the problem
 

Matlab problem

Glad to hear!
 

    Aya2002

    Points: 2
    Helpful Answer Positive Rating
Matlab problem

many thanks AndyECE
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top