Text file results

Hi!

I’m doing some experiments on Black scholes formula, and I would like to extract matrixes in text files.

I do not succed. :(

Does anyone as some code doing that?

Thanks!

I did that, but it isn’t working…:

void PrintMatrix(double** Matrix, int nbrLig, int pasLig, int nbrCol,int pasCol, char* filename)
{
FILE* f;
int i=0;
int j=0;
double m=0;
char* pointv=“\t”;
char* ligne=“\n”;

f=fopen(filename,"w");
for(i=0; i<(nbrLig+1-pasLig); (i=i+pasLig))
{
	for (j=0;j<nbrCol;(j=j+pasCol))
	{
		m=Matrix[i][j];
		fprintf(f,"%15.5f",m);
		fprintf(f,"%s",pointv);
	}
	fprintf(f,"%s", ligne);
}
i=nbrLig-1;
for (j=0;j<nbrCol;(j=j+pasCol))
{
	m=Matrix[i][j];
	fprintf(f,"%15.5f",m);
	fprintf(f,"%s",pointv);
}
fprintf(f,"%s", ligne);
fclose(f);
return;

}

Of course I have the same issues Wen I try to read files…

apperently it is owrking.

;)

I have gor other issues with the data transfert between the system memory and Nvidia card memories, I try to figure that out. :ph34r: