vector_split

Digital Signal Processing Library

Voice Lab

Program name: vector_split

Language: C

In file: vector_lib.c

Objective: split a vector into 2 vectors

Usage: void vector_split(double *vector1, double delta, int vector_length, double **vector_2, double **vector_3);

Parameters:

  • vector1 - The pointer to the first input vector array
  • delta - The constant value by which to multiply the vector elements (1+d and 1-d)
  • vector_width - Number of elements in each vector
  • vector2 - The pointer to the first output vector array address
  • vector3 - The pointer to the second output vector array address
Return value:
  • void

Mathematical Description: v1 * c ---> v2

Comments: Routine is used to split a vector to two vectors

User Comments

Code:

void vector_split(double *vector1, double delta, int vector_length, double **vector_2, double **vector_3)
{
        double aux;

        aux = 1.0 + delta;
        vector_multiply(vector1, aux, vector_length, vector_2);

        aux = 1.0 - delta;
        vector_multiply(vector1, aux, vector_length, vector_3);
        return;
}