I have four streams of complex numbers in four columns of a text file
I have to read them into a MATLAB matrix in the same format.
I tried the following, but it does not work
fid = fopen('~/<path-to-file>/<fileName>.txt','r');
out = textscan(fid, '(%f,%f) \b\t(%f,%f) \b\t(%f,%f) \b\t(%f,%f) \n','CollectOutput',1);
tapWeights = [out{1} + 1i*out{2} out{3} + 1i*out{4} out{5} + 1i*out{6} out{7} + 1i*out{8}];
fclose(fid);
Note that help options for textscan
lists \b\t
as the white space delimiter.
The following is the output I get,
>> out
out =
[1x8 double]
>> out{1}
ans =
1 0 NaN NaN NaN NaN NaN NaN
What am I missing here?