i am writing a code for ofdm generation, and I have a question regarding the same
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
[EDIT: 20110615 22:33 CDT - reformat - WDR]
after these lines
clear all;close all;echo off;tic;
clc;
para=128;
fftlen = 128 ;
noc = 128;
nd = 6 ;
ml = 2 ;
sr = 250000 ;
br = sr .* ml ;
gilen= 32;
ebn0 = 10;
nloop = 100;
noe = 0;
nod = 0 ;
eop = 0 ;
nop = 0;
Y2 = zeros(para,1);
%h = modem.pskmod (4,0);
seridata = rand ( 1, para*nd*ml)>0.5 ;
paradata = reshape( seridata, para,nd*ml)
x=paradata(1,:)
%in = mat2str(x)
%paradata(1,:)
h = modem.qammod(16);
y2= modulate(h,x)
i get an error
??? Undefined function or method 'ceil' for input arguments of type 'logical'.
_**Error in ==> modem.abstractMod.checkModInput at 13
if isempty(x) || ~isreal(x) || any(any(ceil(x) ~= x)) ...
Error in ==> modem.abstractMod.modulate at 10
checkModInput(h, x);
Error in ==> ofdmbook at 36
y2= modulate(h,x)**
Can someone please tell me what is wrong with my code ??
0 commentaires
Réponses (2)
Walter Roberson
le 16 Juin 2011
Change
seridata = rand ( 1, para*nd*ml)>0.5 ;
to
seridata = 0 + rand ( 1, para*nd*ml)>0.5 ;
Yella
le 16 Juin 2011
>> h = modem.qammod(16); >> h
h =
Type: 'QAM Modulator'
M: 16
PhaseOffset: 0
Constellation: [1x16 double]
SymbolOrder: 'Binary'
SymbolMapping: [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]
InputType: 'Integer'
h isnt a matrix of values its just information of the modem. I think h is a transfer function(channel coefficients). i would suggest u first to modulate the input X = qammod(x,16) and convolute the 'h' with 'X' to get the tranmitter data.
3 commentaires
Voir également
Catégories
En savoir plus sur OFDM dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!