Hi Again,
Im Trying to understand how the function convol works by doing a simple program.
I have my input vector a, input vector h and output vector r and their respective pointers.
Im using the linker in the dsplib convol examples.
Here is my code:
#include <dsplib.h>
#include <math.h>
#include "tms320.h"
#include <stdio.h>
#include "stdlib.h"
int i;
#define NX 3
#define NH 4
#define NR 7
DATA a[NX]={1,2,3};
DATA *x=a;
DATA h[NH]={4,3,2,1};
DATA *hc=h;
DATA r[NR];
DATA *rc=r;
void main()
{
for(i=0; i<NX; i++) r[i]=0;
convol(x,hc,rc,NR,NH);
}
By doing this, the result vector r is {0,0,35,0,0,0,0}
What i´m doing wrong?
Thanks!