Hi All!
I'm trying 2 read a text file containing a N X 2 Matrix created in matlab.
The file was created in matlab using :
I tried 2 read the file using (TClite):
I get the error msg: "scanf: Floating point formats not linked, Abnormal program termination".
Where is the problem?
is it C or MATLAB?
Thanks 4 your time.
I'm trying 2 read a text file containing a N X 2 Matrix created in matlab.
The file was created in matlab using :
Code:
n=1:3;
a=exp(j*n);
y=[real(a);imag(a)];
fid = fopen('cplx1.txt','w');
fprintf(fid,'%g %g\n',y);
fclose(fid);
I tried 2 read the file using (TClite):
Code:
....
}
while (!feof(fid))
{
fscanf(fid,"%g %g",&array[i][0],&array[i][1]);
printf("x[%d]= %g+j%g \n",i,array[i][0],array[i][1]);
i++;
}
}...
Where is the problem?
is it C or MATLAB?
Thanks 4 your time.