Home > freetb4matlab > comm > qaskenco.m

qaskenco

PURPOSE ^

%

SYNOPSIS ^

function [a, b] = qaskenco(msg, M)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File}  {} qaskenco (@var{m})
% @deftypefnx {Function File} {} qaskenco (@var{msg},@var{m})
% @deftypefnx {Function File} {@var{y} = } qaskenco (@var{...})
% @deftypefnx {Function File} {[@var{inphase}, @var{quadr}] =} qaskenco (@var{...})
%
% Map a digital signal using a square QASK constellation. The argument
% @var{m} must be a positive integer power of 2. With two input arguments
% the variable @var{msg} represents the message to be encoded. The values
% of @var{msg} must be between 0 and @code{@var{m}-1}. In all cases
% @code{qaskenco(@var{M})} is equivalent to @code{qaskenco(1:@var{m},@var{m})}
%
% Three types of outputs can be created depending on the number of output 
% arguments. That is
%
% @table @asis
% @item No output arguments
% In this case @dfn{qaskenco} plots the constellation. Only the
% points in @var{msg} are plotted, which in the case of a single input
% argument is all constellation points.
% @item A single output argument
% The returned variable is a complex variable representing the in-phase 
% and quadrature components of the mapped  message @var{msg}. With, a 
% single input argument this effectively gives the mapping from symbols
% to constellation points
% @item Two output arguments
% This is the same as two ouput arguments, expect that the in-phase
% and quadrature components are returned explicitly. That is
%
% @example
% octave> c = qaskenco(msg, m);
% octave> [a, b] = qaskenco(msg, m);
% octave> all(c == a + 1i*b)
% ans = 1
% @end example
% @end table
%
% If @code{sqrt(@var{m})} is an integer, then @dfn{qaskenco} uses a Gray
% mapping. Otherwise, an attempt is made to create a nearly square mapping 
% with a minimum Hamming distance between adjacent constellation points.
% @end deftypefn
% @seealso{qaskdeco}

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003