If you hard code the values for NZ and eta1 to something, in just a small program, does it work?
Code:
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
float *a, *b, *c;
float eta1 = 5.201031, eta2 = -2.100515;
int x - 0; NZ = 6;
a = malloc( sizeof(*a) * NZ );
if( a == NULL ) exit(0);
b = malloc( sizeof(*b) * NZ );
if( b == NULL ) exit(0);
c = malloc( sizeof(*c) * NZ );
if( c == NULL ) exit(0);
for( x = 0; x < NZ; x++ )
{
a[x] = -eta2;
printf("a[%d] is %f and should be %f\n", x, a[x], -eta2 );
b[x] = eta1;
printf("b[%d] is %f and should be %f\n", x, b[x], eta1 );
c[x] = -eta2;
printf("c[%d] is %f and should be %f\n", x, c[x], -eta2 );
}
free( a );
free( b );
free( c );
return 0;
}
I think that's right... anyway, do something like that to test it by itself with hard coded values.
Quzah.