I have
'value.asc'
as follows. (ascii)
1 1.000000 0.000000
2 0.157376 -0.987539
3 -0.165522 -0.986206
4 0.995348 -0.096349
5 0.986746 -0.162273
6 0.802929 0.596075
7 0.629992 -0.776601
8 -0.182941 -0.983124
9 -0.434815 -0.900520
10 -0.227926 -0.973678
11 -0.030833 -0.999524
12 -0.748147 -0.663533
13 0.718962 -0.695050
14 0.777737 0.628590
15 0.340350 0.940299
16 0.115246 0.993337
idummy / real part / imaginary part
What I want to do is..
a construction 4*4 complex matrix A using those values.
A=[2+3i 1+2i -1+3i 3+3i;
3-1i 2-2i -2-3i 3-1i;
....
This is a semi-code about what I'm thinking..
open('values.asc')
for j=1,4
for k=1,4 //'because data is from 4*4 complex matrix
read('values.asc') idummy, real, imaginary
complexMatrixA(j,k)=(real)+(imainary)*i // or
complexMatrixA(j,k)=cmplx(real,imaginary)
please help me...................