please could someone help me in creating a recursive functn. for generating walsh codes I cant get the reursion part of it (given input n)
Printable View
please could someone help me in creating a recursive functn. for generating walsh codes I cant get the reursion part of it (given input n)
Why don't you show us what you have so far?
void walsh(int n)
{
int i,j;
int cn[2][2]={1,0,0,1};
if(n<0)
exit(0);
else
{
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
printf("%d\t",cn[i][j]);
printf("\n");
}
walsh((n-1));
}
}
I just cant get the recursion part right.