123 for (
int i = 0;
i <
L;
i++)
179 "Multicode_Spread_2d::set_codes(): dimension mismatch");
Array< T > mid(int pos, int n) const
Get n elements of the array starting from pos.
int size() const
Returns the number of data elements in the array object.
void set_size(int n, bool copy=false)
Resizing an Array<T>.
int length() const
Returns the number of data elements in the array object.
int L
The number of multi-codes.
int N
The spreading factor.
vec spread(const vec &symbols)
Spreading function.
mat get_codes()
Returns the matrix containing the spreading codes used as rows in the matrix.
Multicode_Spread_1d()
Constructor.
vec despread(const vec &receivedsignal, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
void set_codes(const mat &incodes)
Set the spreading codes. Each row represent one spreading code. The spreading factor equals the numbe...
mat codes
The spreading codes used size ( )
cvec spread(const cvec &symbols)
Spreading of signal.
Multicode_Spread_1d mcspreadI
mat get_codesQ()
Return the matrix containing the quadrature-phase codes (as rows)
Multicode_Spread_2d()
Constructor.
mat get_codesI()
Return the matrix containing the in-phase codes (as rows)
Multicode_Spread_1d mcspreadQ
void set_codes(const mat &incodesI, const mat &incodesQ)
Set the spreading codes.
cvec despread(const cvec &receivedsignal, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
int N
The spreading factor.
void despread(const vec &rec_signal, vec &out, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
vec code
The spreading code.
void set_code(const vec &incode)
Set the spreading code used for spreading.
vec get_code()
Returns the spreading code used.
void spread(const vec &symbols, vec &out)
Spreading of signal return i out.
void spread(const cvec &symbols, cvec &out)
Spreading of signal.
void despread(const cvec &rec_signal, cvec &out, int timing)
Despreading of signal. timing is the start position of the first symbol, given in number of samples.
vec get_codeI()
Returns the in-phase spreading code.
vec get_codeQ()
Returns the quadrature-phase spreading code.
void set_code(const vec &incodeI, const vec &incodeQ)
Set the in-phase and the quadrature-phase spreading codes.
Definitions of converters between different vector and matrix types.
#define it_assert(t, s)
Abort if t is not true.
vec imag(const cvec &data)
Imaginary part of complex values.
vec real(const cvec &data)
Real part of complex values.
double norm(const cvec &v)
Calculate the 2-norm: norm(v)=sqrt(sum(abs(v).^2))
Miscellaneous statistics functions and classes - header file.
cvec to_cvec(const Vec< T > &v)
Converts a Vec<T> to cvec.
Definition of spread spectrum classes and functions.