Introduction - If you have any usage issues, please Google them yourself
OVSF code generator:
The function ovsf_code_generator takes a vector of spreading factors which OVSF codes are required followed by an integer specifying the number of elements in that vector. The function returns a vector of vectors of double, where each vector of doubles consists of the bipolar elements of the OVSF code corresponding to the spreading factor in the same position in the input vector. Thus, the output vector will have the same length as the number of spreading factors and the length of each of the the sub-vectors will be equal to the spreading factor value in the
corresponding position.