DSPRelated.com
Forums

fprintf or ??

Started by kianogo September 3, 2003
Hi,

I'm new to matlab without any detailed knowledge in fft.

Referring to command sequence below, the original data (seg) and its
fft2(seg),

First a short question:
Why the first number has not any imaginary part?

And now to the long question:

I need to find the Amplitude of each data point using 1/2(Real^2 +
Imag^2), Where real and imaginary are separate column vectors.

My problem is in writing the imaginary part into a separate column
into a text file!
As you see below, the 'save' command doesn't really work and I have
some trouble with the 'fprintf' command in the M-file.

How to write the real and imaginary parts to a 2 separate columns in
a text file? or where am I wrong?

many thanks for your time
kiano A sample of original data and what we see in the command window:
seg =

99.7400
95.1140
91.2540
88.0290
85.4060
83.3650
81.8590

Yt2(seg), format short g

Y =

624.77
14.965 - 19.192i
11.168 - 7.449i
10.573 - 2.1405i
10.573 + 2.1405i
11.168 + 7.449i
14.965 + 19.192i

save fft2.dat Y -ascii
Warning: Imaginary part of complex variable 'Y' not saved to ASCII
file.

(here is the created text file using the 'save' command):
6.2476700e+002
1.4964942e+001
1.1168474e+001
1.0573084e+001
1.0573084e+001
1.1168474e+001
1.4964942e+001

When using the M-file here (instead of 'save' command):

1- Y= fft2(seg)
2- fid = fopen('fft2.dat','w');
3- fprintf(fid,'%6.4f %6.4f\n',Y);
4- fclose(fid);

(here is the created text file using the above M-file):
624.7670 14.9649
11.1685 10.5731
10.5731 11.1685
14.9649

(now modifying line 3 in the M-file to):
1- Y= fft2(seg)
2- fid = fopen('fft2.dat','w');
3- fprintf(fid,'%6.4f\n',Y);
4- fclose(fid);

(and the created text file):
624.7670
14.9649
11.1685
10.5731
10.5731
11.1685
14.9649 the imaginaries are still absent !?



Message
Try
 
YSav = [real(Y) imag(Y)];
save Fft2.dat YSav -ascii
 
Sincerely,
Glen Ragan
 
-----Original Message-----
From: kianogo [mailto:k...@yahoo.dk]
Sent: Wednesday, September 03, 2003 7:34 AM
To: m...@yahoogroups.com
Subject: [matlab] fprintf or ??

Hi,

I'm new to matlab without any detailed knowledge in fft.

Referring to command sequence below, the original data (seg) and its
fft2(seg),

First a short question:
Why the first number has not any imaginary part?

And now to the long question:

I need to find the Amplitude of each data point using 1/2(Real^2 +
Imag^2), Where real and imaginary are separate column vectors.

My problem is in writing the imaginary part into a separate column
into a text file!
As you see below, the 'save' command doesn't really work and I have
some trouble with the 'fprintf' command in the M-file.

How to write the real and imaginary parts to a 2 separate columns in
a text file? or where am I wrong?

many thanks for your time
kianoA sample of original data and what we see in the command window:
seg =

   99.7400
   95.1140
   91.2540
   88.0290
   85.4060
   83.3650
   81.8590

Yt2(seg), format short g

Y =

      624.77             
      14.965 -     19.192i
      11.168 -      7.449i
      10.573 -     2.1405i
      10.573 +     2.1405i
      11.168 +      7.449i
      14.965 +     19.192i

save fft2.dat Y -ascii
Warning: Imaginary part of complex variable 'Y' not saved to ASCII
file.

      (here is the created text file using the 'save' command):
        6.2476700e+002
        1.4964942e+001
        1.1168474e+001
        1.0573084e+001
        1.0573084e+001
        1.1168474e+001
        1.4964942e+001

      When using the M-file here (instead of 'save' command):

1- Y= fft2(seg)
2- fid = fopen('fft2.dat','w');
3- fprintf(fid,'%6.4f %6.4f\n',Y);
4- fclose(fid);

      (here is the created text file using the above M-file):
      624.7670 14.9649
      11.1685 10.5731
      10.5731 11.1685
      14.9649

      (now modifying line 3 in the M-file to):
1- Y= fft2(seg)
2- fid = fopen('fft2.dat','w');
3- fprintf(fid,'%6.4f\n',Y);
4- fclose(fid);
     
      (and the created text file):
      624.7670
      14.9649
      11.1685
      10.5731
      10.5731
      11.1685
      14.9649the imaginaries are still absent !?



_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3


">Yahoo! Terms of Service.
Hi,

> My problem is in writing the imaginary part into a separate column
> into a text file!

To split a complex number into its real and imaginary part use the real() and
imag() functions. Both accept vectors and give you a vector with the value of
the part of the complex number, respectively.

Now you can store the data in two ways. Either sequentially, or as a matrix.
For the sequential way use:

re= real(seg);
im= imag(seg);
save('fft2.dat', '-ascii', 're', 'im');

To do it in two columns concatenate the two vectors to a matrix and save the
matrix.

dest= [ real(seg), imag(seg) ];
save('fft2.dat', '-ascii', 'dest');

Beware you loss the imaginary 'i' in the number. You will only store the
values of the real and imaginary parts. I.e. 4+5i is stored as:

4.0 5.0
^^^
the i is missing!

Hope that helps. Greets,
Andre
--
Andre Vehreschild -- Institute for Scientific Computing, Aachen University
mailto: , phone: ++49- 241- 80- 24874
GnuPG-key available at http://www.sc.rwth-aachen.de/vehreschild




... now I can save results on 3-column ascii;
but I think my data points have changed their position at the profile line on the xy-plan !!
 
I need to do fft2(z), where z=f(x,y), then set phase angle to zero and finally do ifft2 without any changes of their x- or y-positions on the profiles!
 
here is the procedure I applied on the data below:
 
Y= fft2(z);
A= abs(Y);
P= ifft2(A);
%plotting original data:
figure(1)
plot3(x,y,z), grid on
%plotting phase shifted-to-zero data:
figure(2)
plot3(x,y,P), grid on
 
I expect to get the phase shifted curves to be similar to the original curves as in figure(1) with some minor changes because the phase angels of the original data points are very small !
 
But in figure(2) the curves are very different from figure(1) which I suspect to be wrong somehow !?
 
any kind of help is greatly appreciated,
kiano
 
(sample of original data including only 2-lines)
x          y           z
465590 7764100 -56.84
465730 7764100 -56.525
465880 7764100 -56.462
466020 7764100 -56.556
466170 7764100 -56.733
466320 7764100 -56.938
466460 7764100 -57.127
466610 7764100 -57.263
466750 7764100 -57.32
466900 7764100 -57.292
467050 7764100 -57.179
467190 7764100 -56.973
467340 7764100 -56.674
467480 7764100 -56.295
467630 7764100 -55.863
467780 7764100 -55.396
467920 7764100 -54.887
468070 7764100 -54.328
468210 7764100 -53.715
468360 7764100 -53.043
468510 7764100 -52.309
468650 7764100 -51.498
468800 7764100 -50.605
468940 7764100 -49.651
469090 7764100 -48.653
469240 7764100 -47.611
469380 7764100 -46.526
469530 7764100 -45.409
469670 7764100 -44.277
469820 7764100 -43.138
469970 7764100 -41.986
470110 7764100 -40.822
470260 7764100 -39.66
470400 7764100 -38.518
470550 7764100 -37.42
470700 7764100 -36.391
470840 7764100 -35.429
470990 7764100 -34.509
471130 7764100 -33.611
471280 7764100 -32.73
471430 7764100 -31.872
471570 7764100 -31.052
471720 7764100 -30.276
471860 7764100 -29.535
472010 7764100 -28.812
472160 7764100 -28.102
472300 7764100 -27.407
472450 7764100 -26.744
472590 7764100 -26.146
472740 7764100 -25.645
472890 7764100 -25.238
473030 7764100 -24.881
473180 7764100 -24.539
473320 7764100 -24.193
473470 7764100 -23.814
473620 7764100 -23.337
473760 7764100 -22.714
473910 7764100 -21.982
474050 7764100 -21.189
474200 7764100 -20.343
474350 7764100 -19.437
474490 7764100 -18.475
474640 7764100 -17.469
474780 7764100 -16.415
474930 7764100 -15.287
475080 7764100 -14.071
475220 7764100 -12.769
475370 7764100 -11.376
475510 7764100 -9.8587
475660 7764100 -8.1597
475810 7764100 -6.2572
475950 7764100 -4.1801
476100 7764100 -1.9831
476240 7764100 0.27225
476390 7764100 2.5297
476540 7764100 4.7281
476680 7764100 6.8244
476830 7764100 8.8253
476970 7764100 10.765
477120 7764100 12.654
477270 7764100 14.458
477410 7764100 16.127
477560 7764100 17.603
477700 7764100 18.837
477850 7764100 19.869
478000 7764100 20.798
478140 7764100 21.71
478290 7764100 22.668
478430 7764100 23.744
478580 7764100 25.036
478730 7764100 26.596
478870 7764100 28.365
479020 7764100 30.225
479160 7764100 32.072
479310 7764100 33.832
479460 7764100 35.476
479600 7764100 37.046
479750 7764100 38.652
479890 7764100 40.309
480040 7764100 41.814
480190 7764100 42.915
480330 7764100 43.475
480480 7764100 43.47
480620 7764100 42.964
480770 7764100 42.141
480920 7764100 41.152
481060 7764100 40.059
481210 7764100 38.957
481350 7764100 38
481500 7764100 37.269
481650 7764100 36.778
481790 7764100 36.489
481940 7764100 36.324
482080 7764100 36.202
482230 7764100 36.059
482380 7764100 35.855
482520 7764100 35.584
482670 7764100 35.239
482810 7764100 34.803
482960 7764100 34.321
483110 7764100 33.841
483250 7764100 33.357
483400 7764100 32.832
483540 7764100 32.217
483690 7764100 31.438
483840 7764100 30.451
483980 7764100 29.244
484130 7764100 27.717
484270 7764100 25.748
484420 7764100 23.403
484570 7764100 20.944
484710 7764100 18.625
484860 7764100 16.607
485000 7764100 14.944
485150 7764100 13.681
485300 7764100 12.841
485440 7764100 12.347
485590 7764100 12.099
485730 7764100 12.014
485880 7764100 12.018
486030 7764100 12.032
486170 7764100 12.007
486320 7764100 11.928
486460 7764100 11.806
486610 7764100 11.638
486760 7764100 11.405
486900 7764100 11.098
487050 7764100 10.726
487190 7764100 10.303
487340 7764100 9.834
487490 7764100 9.3359
487630 7764100 8.8472
487780 7764100 8.3846
487920 7764100 7.9364
488070 7764100 7.5088
488220 7764100 7.1429
488360 7764100 6.8539
488510 7764100 6.5774
488650 7764100 6.1981
488800 7764100 5.6142
488950 7764100 4.7978
489090 7764100 3.7884
489240 7764100 2.6496
489380 7764100 1.4743
489530 7764100 0.39123
489680 7764100 -0.47907
489820 7764100 -1.0522
489970 7764100 -1.27
490110 7764100 -1.0475
490260 7764100 -0.29837
490410 7764100 0.9729
490550 7764100 2.629
490700 7764100 4.4714
490840 7764100 6.4309
490990 7764100 8.6295
491140 7764100 11.281
491280 7764100 14.529
491430 7764100 18.252
491570 7764100 22.176
491720 7764100 26.087
491870 7764100 29.825
492010 7764100 33.186
492160 7764100 35.847
492300 7764100 37.479
492450 7764100 37.938
492600 7764100 37.345
492740 7764100 35.97
492890 7764100 34.013
493030 7764100 31.527
493180 7764100 28.515
493330 7764100 25.106
493470 7764100 21.546
493620 7764100 17.943
493760 7764100 14.361
493910 7764100 11.179
494060 7764100 8.9543
494200 7764100 8.0445
494350 7764100 8.6277
494490 7764100 11.075
494640 7764100 16.43
494790 7764100 25.714
494930 7764100 37.717
495080 7764100 49.126
495220 7764100 56.212
495370 7764100 57.041
495520 7764100 53.157
495660 7764100 47.758
495810 7764100 42.792
495950 7764100 38.656
496100 7764100 35.081
496250 7764100 31.698
496390 7764100 28.313
496540 7764100 24.701
496680 7764100 20.259
496830 7764100 14.559
496980 7764100 8.2101
497120 7764100 2.383
497270 7764100 -1.9021
497410 7764100 -4.4806
497560 7764100 -5.6808
497710 7764100 -5.0097
497850 7764100 -1.7151
498000 7764100 3.183
498140 7764100 6.5669
498290 7764100 4.4305
498440 7764100 -3.8225
498580 7764100 -14.937
498730 7764100 -25.375
498870 7764100 -33.553
499020 7764100 -39.515
499170 7764100 -44.269
499310 7764100 -48.718
499460 7764100 -52.376
499600 7764100 -54.126
499750 7764100 -53.33
499900 7764100 -47.863
500040 7764100 -35.43
500190 7764100 -18.201
500330 7764100 2.1694
500480 7764100 30.856
500630 7764100 71.864
500770 7764100 121.78
500920 7764100 177.33
501060 7764100 237
501210 7764100 297.59
501360 7764100 355.83
501500 7764100 406.61
501650 7764100 445.26
501790 7764100 469.52
501940 7764100 481.11
502090 7764100 487.33
502230 7764100 497.79
502380 7764100 514.07
502520 7764100 533.4
502670 7764100 556.26
502820 7764100 584.66
502960 7764100 616.68
503110 7764100 651.1
503250 7764100 689.07
503400 7764100 729.41
503550 7764100 769.11
503690 7764100 808.85
503840 7764100 849.14
503980 7764100 885.82
504130 7764100 916.38
504280 7764100 942.34
504420 7764100 965.6
504570 7764100 985.77
504710 7764100 1001.9
504860 7764100 1014.2
505010 7764100 1022.7
505150 7764100 1026.9
505300 7764100 1028
505440 7764100 1027.7
505590 7764100 1024.6
505740 7764100 1015.8
505880 7764100 1001.7
506030 7764100 985.21
506170 7764100 965.66
506320 7764100 940.88
506470 7764100 911.4
506610 7764100 878.81
506760 7764100 841.07
506900 7764100 797.21
507050 7764100 749.98
507200 7764100 703.86
507340 7764100 661.71
507490 7764100 623.8
507630 7764100 588.29
507780 7764100 553.91
507930 7764100 520.82
508070 7764100 489.53
508220 7764100 460.19
508360 7764100 432.92
508510 7764100 408.04
508660 7764100 385.97
508800 7764100 367.14
508950 7764100 351.62
509090 7764100 338.49
509240 7764100 326.25
509390 7764100 314.01
509530 7764100 301.59
509680 7764100 289.05
509820 7764100 276.53
509970 7764100 264.14
510120 7764100 251.43
510260 7764100 237.7
510410 7764100 222.52
510550 7764100 206.2
510700 7764100 189.35
510850 7764100 172.66
510990 7764100 156.49
511140 7764100 141
511280 7764100 126.32
511430 7764100 112.66
511580 7764100 100.26
511720 7764100 89.324
511870 7764100 79.925
512010 7764100 71.878
512160 7764100 64.919
512310 7764100 58.831
512450 7764100 53.469
512600 7764100 48.706
512740 7764100 44.436
512890 7764100 40.545
513040 7764100 36.852
513180 7764100 33.136
513330 7764100 29.274
513470 7764100 25.287
513620 7764100 21.25
513770 7764100 17.242
513910 7764100 13.325
514060 7764100 9.4808
514200 7764100 5.6493
514350 7764100 1.7837
514500 7764100 -2.1137
514640 7764100 -6.0118
514790 7764100 -9.8629
514930 7764100 -13.619
515080 7764100 -17.217
515230 7764100 -20.596
515370 7764100 -23.723
515520 7764100 -26.585
515660 7764100 -29.179
515810 7764100 -31.511
515960 7764100 -33.607
516100 7764100 -35.615
516250 7764100 -37.782
516390 7764100 -40.204
516540 7764100 -42.66
516690 7764100 -44.767
516830 7764100 -46.252
516980 7764100 -47.035
517120 7764100 -47.164
517270 7764100 -46.771
517420 7764100 -46.027
517560 7764100 -45.082
517710 7764100 -44.028
517850 7764100 -42.952
518000 7764100 -42.012
518150 7764100 -41.435
518290 7764100 -41.375
518440 7764100 -41.882
518580 7764100 -42.997
518730 7764100 -44.837
518880 7764100 -47.409
519020 7764100 -50.493
519170 7764100 -53.825
519310 7764100 -57.247
519460 7764100 -60.677
519610 7764100 -64.118
519750 7764100 -67.648
519900 7764100 -71.282
520040 7764100 -74.815
520190 7764100 -77.914
520340 7764100 -80.345
520480 7764100 -82.126
520630 7764100 -83.45
520770 7764100 -84.562
520920 7764100 -85.584
521070 7764100 -86.533
521210 7764100 -87.511
521360 7764100 -88.548
521500 7764100 -89.414
521650 7764100 -89.853
521800 7764100 -89.89
521940 7764100 -89.67
522090 7764100 -89.149
522230 7764100 -88.187
522380 7764100 -86.925
522530 7764100 -85.643
522670 7764100 -84.551
522820 7764100 -83.796
522960 7764100 -83.54
523110 7764100 -83.68
523260 7764100 -83.998
523400 7764100 -84.46
523550 7764100 -85.218
523690 7764100 -86.328
523840 7764100 -87.72
523990 7764100 -89.291
524130 7764100 -91.006
524280 7764100 -92.873
524420 7764100 -94.792
524570 7764100 -96.47
524720 7764100 -97.632
524860 7764100 -98.175
525010 7764100 -97.967
525150 7764100 -96.58
525300 7764100 -93.733
525450 7764100 -89.925
525590 7764100 -84.906
525740 7764100 -76.942
525880 7764100 -65.298
526030 7764100 -52.063
526180 7764100 -39.697
526320 7764100 -29.507
526470 7764100 -21.533
526610 7764100 -15.321
526760 7764100 -11.102
526910 7764100 -9.2844
527050 7764100 -9.4712
527200 7764100 -10.977
527340 7764100 -13.677
527490 7764100 -17.521
527640 7764100 -21.59
527780 7764100 -24.904
527930 7764100 -27.745
528070 7764100 -30.78
528220 7764100 -33.96
528370 7764100 -37.187
528510 7764100 -40.528
528660 7764100 -43.451
528800 7764100 -45.018
528950 7764100 -45.577
529100 7764100 -46.494
529240 7764100 -48.781
529390 7764100 -52.626
529530 7764100 -57.315
529680 7764100 -61.695
529830 7764100 -65.012
529970 7764100 -67.478
530120 7764100 -69.493
530260 7764100 -71.214
530410 7764100 -72.61
530560 7764100 -73.432
530700 7764100 -73.176
530850 7764100 -71.648
530990 7764100 -69.328
531140 7764100 -67.007
531290 7764100 -65.286
531430 7764100 -64.365
531580 7764100 -63.985
531720 7764100 -63.743
531870 7764100 -63.401
532020 7764100 -62.948
532160 7764100 -62.428
532310 7764100 -61.829
532450 7764100 -61.053
532600 7764100 -59.938
532750 7764100 -58.36
532890 7764100 -56.306
533040 7764100 -53.894
533180 7764100 -51.349
533330 7764100 -48.902
533480 7764100 -46.718
533620 7764100 -44.943
533770 7764100 -43.721
533910 7764100 -43.014
534060 7764100 -42.654
534210 7764100 -42.505
534350 7764100 -42.486
534500 7764100 -42.541
534640 7764100 -42.614
534790 7764100 -42.668
534940 7764100 -42.715
535080 7764100 -42.836
535230 7764100 -43.126
535370 7764100 -43.571
535520 7764100 -44.034
535670 7764100 -44.331
535810 7764100 -44.303
535960 7764100 -43.899
536100 7764100 -43.153
536250 7764100 -42.08
536400 7764100 -40.666
536540 7764100 -38.975
536690 7764100 -37.187
536830 7764100 -35.451
536980 7764100 -33.766
537130 7764100 -32.008
537270 7764100 -30.038
537420 7764100 -27.825
537560 7764100 -25.454
537710 7764100 -23.036
537860 7764100 -20.615
538000 7764100 -18.231
538150 7764100 -15.997
538290 7764100 -14.026
538440 7764100 -12.376
538590 7764100 -11.117
538730 7764100 -10.291
538880 7764100 -9.8266
539020 7764100 -9.6494
539170 7764100 -9.7445
539320 7764100 -10.023
539460 7764100 -10.245
539610 7764100 -10.152
539750 7764100 -9.55
539900 7764100 -8.3198
540050 7764100 -6.4293
540190 7764100 -3.8901
540340 7764100 -0.77525
540480 7764100 2.7563
540630 7764100 6.5029
540780 7764100 10.254
540920 7764100 13.766
541070 7764100 16.699
541210 7764100 18.749
541360 7764100 19.844
541510 7764100 20.109
541650 7764100 19.594
541800 7764100 18.331
541940 7764100 16.492
542090 7764100 14.387
542240 7764100 12.33
542380 7764100 10.473
542530 7764100 8.7584
542670 7764100 7.186
542820 7764100 5.8317
542970 7764100 4.6276
543110 7764100 3.4226
543260 7764100 2.1952
543400 7764100 0.9557
543550 7764100 -0.38247
543700 7764100 -1.9355
543840 7764100 -3.7506
543990 7764100 -5.7954
544130 7764100 -7.941
544280 7764100 -9.9334
544430 7764100 -11.52
544570 7764100 -12.665
544720 7764100 -13.495
544860 7764100 -14.18
545010 7764100 -14.842
545160 7764100 -15.499
545300 7764100 -16.104
545450 7764100 -16.646
545590 7764100 -17.144
545740 7764100 -17.617
545890 7764100 -18.076
546030 7764100 -18.503
546180 7764100 -18.833
546320 7764100 -18.991
546470 7764100 -18.9
546620 7764100 -18.49
546760 7764100 -17.711
546910 7764100 -16.534
547050 7764100 -14.996
547200 7764100 -13.179
547350 7764100 -11.167
547490 7764100 -9.1306
547640 7764100 -7.3557
547780 7764100 -6.1966
465590 7764300 -56.626
465730 7764300 -56.185
465880 7764300 -56.015
466020 7764300 -56.017
466170 7764300 -56.114
466320 7764300 -56.247
466460 7764300 -56.375
466610 7764300 -56.469
466750 7764300 -56.509
466900 7764300 -56.481
467050 7764300 -56.374
467190 7764300 -56.185
467340 7764300 -55.917
467480 7764300 -55.572
467630 7764300 -55.155
467780 7764300 -54.67
467920 7764300 -54.131
468070 7764300 -53.546
468210 7764300 -52.909
468360 7764300 -52.211
468510 7764300 -51.448
468650 7764300 -50.604
468800 7764300 -49.676
468940 7764300 -48.682
469090 7764300 -47.644
469240 7764300 -46.569
469380 7764300 -45.462
469530 7764300 -44.324
469670 7764300 -43.154
469820 7764300 -41.965
469970 7764300 -40.767
470110 7764300 -39.567
470260 7764300 -38.376
470400 7764300 -37.214
470550 7764300 -36.11
470700 7764300 -35.091
470840 7764300 -34.148
470990 7764300 -33.25
471130 7764300 -32.38
471280 7764300 -31.531
471430 7764300 -30.706
471570 7764300 -29.917
471720 7764300 -29.174
471860 7764300 -28.47
472010 7764300 -27.788
472160 7764300 -27.118
472300 7764300 -26.465
472450 7764300 -25.844
472590 7764300 -25.283
472740 7764300 -24.807
472890 7764300 -24.407
473030 7764300 -24.048
473180 7764300 -23.697
473320 7764300 -23.334
473470 7764300 -22.933
473620 7764300 -22.431
473760 7764300 -21.778
473910 7764300 -21.006
474050 7764300 -20.173
474200 7764300 -19.292
474350 7764300 -18.356
474490 7764300 -17.366
474640 7764300 -16.325
474780 7764300 -15.224
474930 7764300 -14.05
475080 7764300 -12.795
475220 7764300 -11.461
475370 7764300 -10.033
475510 7764300 -8.4695
475660 7764300 -6.7235
475810 7764300 -4.7782
475950 7764300 -2.6572
476100 7764300 -0.41148
476240 7764300 1.8943
476390 7764300 4.203
476540 7764300 6.4579
476680 7764300 8.6104
476830 7764300 10.658
476970 7764300 12.638
477120 7764300 14.562
477270 7764300 16.404
477410 7764300 18.105
477560 7764300 19.569
477700 7764300 20.725
477850 7764300 21.633
478000 7764300 22.422
478140 7764300 23.184
478290 7764300 23.992
478430 7764300 24.909
478580 7764300 25.979
478730 7764300 27.208
478870 7764300 28.542
479020 7764300 29.892
479160 7764300 31.192
479310 7764300 32.428
479460 7764300 33.602
479600 7764300 34.766
479750 7764300 36.044
479890 7764300 37.494
480040 7764300 38.927
480190 7764300 40.028
480330 7764300 40.576
480480 7764300 40.583
480620 7764300 40.252
480770 7764300 39.826
480920 7764300 39.421
481060 7764300 39.004
481210 7764300 38.531
481350 7764300 38.029
481500 7764300 37.555
481650 7764300 37.16
481790 7764300 36.863
481940 7764300 36.618
482080 7764300 36.377
482230 7764300 36.12
482380 7764300 35.829
482520 7764300 35.493
482670 7764300 35.119
482810 7764300 34.72
482960 7764300 34.319
483110 7764300 33.946
483250 7764300 33.61
483400 7764300 33.275
483540 7764300 32.845
483690 7764300 32.221
483840 7764300 31.336
483980 7764300 30.174
484130 7764300 28.625
484270 7764300 26.53
484420 7764300 23.959
484570 7764300 21.228
484710 7764300 18.657
484860 7764300 16.43
485000 7764300 14.594
485150 7764300 13.147
485300 7764300 12.086
485440 7764300 11.367
485590 7764300 10.91
485730 7764300 10.649
485880 7764300 10.524
486030 7764300 10.462
486170 7764300 10.395
486320 7764300 10.287
486460 7764300 10.137
486610 7764300 9.9447
486760 7764300 9.6779
486900 7764300 9.3129
487050 7764300 8.8728
487190 7764300 8.3968
487340 7764300 7.895
487490 7764300 7.3804
487630 7764300 6.8925
487780 7764300 6.4718
487920 7764300 6.1052
488070 7764300 5.7841
488220 7764300 5.5467
488360 7764300 5.4025
488510 7764300 5.2717
488650 7764300 5.0277
488800 7764300 4.5625
488950 7764300 3.842
489090 7764300 2.9163
489240 7764300 1.8514
489380 7764300 0.73291
489530 7764300 -0.30849
489680 7764300 -1.1406
489820 7764300 -1.6835
489970 7764300 -1.8821
490110 7764300 -1.6576
490260 7764300 -0.91887
490410 7764300 0.34025
490550 7764300 1.9892
490700 7764300 3.874
490840 7764300 5.9437
490990 7764300 8.3211
491140 7764300 11.193
491280 7764300 14.639
491430 7764300 18.519
491570 7764300 22.587
491720 7764300 26.636
491870 7764300 30.506
492010 7764300 33.975
492160 7764300 36.725
492300 7764300 38.451
492450 7764300 39.038
492600 7764300 38.623
492740 7764300 37.464
492890 7764300 35.781
493030 7764300 33.683
493180 7764300 31.21
493330 7764300 28.464
493470 7764300 25.612
493620 7764300 22.65
493760 7764300 19.496
493910 7764300 16.423
494060 7764300 13.943
494200 7764300 12.304
494350 7764300 11.64
494490 7764300 12.456
494640 7764300 15.719
494790 7764300 21.977
494930 7764300 30.098
495080 7764300 37.693
495220 7764300 42.395
495370 7764300 43.166
495520 7764300 40.683
495660 7764300 36.809
495810 7764300 33.212
495950 7764300 30.37
496100 7764300 28.019
496250 7764300 25.83
496390 7764300 23.659
496540 7764300 21.325
496680 7764300 18.06
496830 7764300 13.067
496980 7764300 7.1043
497120 7764300 1.5871
497270 7764300 -2.6193
497410 7764300 -5.4058
497560 7764300 -6.8416
497710 7764300 -6.3039
497850 7764300 -3.2043
498000 7764300 1.321
498140 7764300 3.9857
498290 7764300 1.4135
498440 7764300 -6.569
498580 7764300 -17.217
498730 7764300 -27.806
498870 7764300 -36.975
499020 7764300 -44.71
499170 7764300 -51.332
499310 7764300 -56.944
499460 7764300 -61.575
499600 7764300 -64.903
499750 7764300 -66.29
499900 7764300 -63.423
500040 7764300 -54.911
500190 7764300 -42.987
500330 7764300 -28.611
500480 7764300 -7.6285
500630 7764300 20.726
500770 7764300 50.603
500920 7764300 79.726
501060 7764300 113.43
501210 7764300 153.22
501360 7764300 195.06
501500 7764300 235.05
501650 7764300 270.22
501790 7764300 296.5
501940 7764300 313.01
502090 7764300 325.38
502230 7764300 341.16
502380 7764300 363.16
502520 7764300 387.97
502670 7764300 413.86
502820 7764300 441.75
502960 7764300 472.37
503110 7764300 505.7
503250 7764300 542.91
503400 7764300 583.46
503550 7764300 625.53
503690 7764300 669.3
503840 7764300 714.64
503980 7764300 757.24
504130 7764300 794.86
504280 7764300 830.02
504420 7764300 864.98
504570 7764300 898.65
504710 7764300 928.06
504860 7764300 952.26
505010 7764300 972.19
505150 7764300 988.05
505300 7764300 998.56
505440 7764300 1003.7
505590 7764300 1004.4
505740 7764300 1000.4
505880 7764300 991.29
506030 7764300 977.49
506170 7764300 960.31
506320 7764300 940.72
506470 7764300 918.47
506610 7764300 890.54
506760 7764300 854.5
506900 7764300 811.47
507050 7764300 764.81
507200 7764300 717.67
507340 7764300 673.89
507490 7764300 634.98
507630 7764300 599.24
507780 7764300 564.46
507930 7764300 530.89
508070 7764300 499.6
508220 7764300 470.34
508360 7764300 442.27
508510 7764300 415.96
508660 7764300 392.87
508800 7764300 373.96
508950 7764300 358.8
509090 7764300 346.06
509240 7764300 334.57
509390 7764300 323.62
509530 7764300 312.56
509680 7764300 300.97
509820 7764300 289.27
509970 7764300 277.91
510120 7764300 266.05
510260 7764300 252.14
510410 7764300 235.95
510550 7764300 218.32
510700 7764300 200.22
510850 7764300 182.37
510990 7764300 165.24
511140 7764300 148.89
511280 7764300 133.25
511430 7764300 118.41
511580 7764300 104.82
511720 7764300 92.893
511870 7764300 82.762
512010 7764300 74.166
512160 7764300 66.75
512310 7764300 60.294
512450 7764300 54.633
512600 7764300 49.603
512740 7764300 45.109
512890 7764300 41.097
513040 7764300 37.397
513180 7764300 33.715
513330 7764300 29.879
513470 7764300 25.94
513620 7764300 22.002
513770 7764300 18.124
513910 7764300 14.329
514060 7764300 10.616
514200 7764300 6.9431
514350 7764300 3.2489
514500 7764300 -0.48601
514640 7764300 -4.2237
514790 7764300 -7.9054
514930 7764300 -11.474
515080 7764300 -14.873
515230 7764300 -18.039
515370 7764300 -20.948
515520 7764300 -23.621
515660 7764300 -26.085
515810 7764300 -28.344
515960 7764300 -30.425
516100 7764300 -32.45
516250 7764300 -34.598
516390 7764300 -36.931
516540 7764300 -39.269
516690 7764300 -41.307
516830 7764300 -42.817
516980 7764300 -43.709
517120 7764300 -43.992
517270 7764300 -43.738
517420 7764300 -43.093
517560 7764300 -42.212
517710 7764300 -41.229
517850 7764300 -40.272
518000 7764300 -39.474
518150 7764300 -38.983
518290 7764300 -38.966
518440 7764300 -39.529
518580 7764300 -40.727
518730 7764300 -42.607
518880 7764300 -45.143
519020 7764300 -48.169
519170 7764300 -51.466
519310 7764300 -54.849
519460 7764300 -58.23
519610 7764300 -61.591
519750 7764300 -64.939
519900 7764300 -68.233
520040 7764300 -71.332
520190 7764300 -74.019
520340 7764300 -76.137
520480 7764300 -77.696
520630 7764300 -78.88
520770 7764300 -79.95
520920 7764300 -81.029
521070 7764300 -82.084
521210 7764300 -83.128
521360 7764300 -84.161
521500 7764300 -85.013
521650 7764300 -85.562
521800 7764300 -85.896
521940 7764300 -86.1
522090 7764300 -86.079
522230 7764300 -85.667
522380 7764300 -84.891
522530 7764300 -83.977
522670 7764300 -83.115
522820 7764300 -82.357
522960 7764300 -81.72
523110 7764300 -81.321
523260 7764300 -81.245
523400 7764300 -81.485
523550 7764300 -81.963
523690 7764300 -82.664
523840 7764300 -83.542
523990 7764300 -84.513
524130 7764300 -85.577
524280 7764300 -86.878
524420 7764300 -88.421
524570 7764300 -89.95
524720 7764300 -91.213
524860 7764300 -92.115
525010 7764300 -92.548
525150 7764300 -92.262
525300 7764300 -91.151
525450 7764300 -89.425
525590 7764300 -86.743
525740 7764300 -81.891
525880 7764300 -74.734
526030 7764300 -66.82
526180 7764300 -59.05
526320 7764300 -51.125
526470 7764300 -43.818
526610 7764300 -37.939
526760 7764300 -33.98
526910 7764300 -32.359
527050 7764300 -32.931
527200 7764300 -34.53
527340 7764300 -36.805
527490 7764300 -40.232
527640 7764300 -43.878
527780 7764300 -45.78
527930 7764300 -46.539
528070 7764300 -47.831
528220 7764300 -49.748
528370 7764300 -51.804
528510 7764300 -54.097
528660 7764300 -56.065
528800 7764300 -56.568
528950 7764300 -55.731
529100 7764300 -55.106
529240 7764300 -56.096
529390 7764300 -58.921
529530 7764300 -62.623
529680 7764300 -66.059
529830 7764300 -68.696
529970 7764300 -70.68
530120 7764300 -72.18
530260 7764300 -73.268
530410 7764300 -74.057
530560 7764300 -74.334
530700 7764300 -73.58
530850 7764300 -71.593
530990 7764300 -68.926
531140 7764300 -66.307
531290 7764300 -64.237
531430 7764300 -62.858
531580 7764300 -61.988
531720 7764300 -61.303
531870 7764300 -60.565
532020 7764300 -59.717
532160 7764300 -58.827
532310 7764300 -57.922
532450 7764300 -56.89
532600 7764300 -55.553
532750 7764300 -53.803
532890 7764300 -51.665
533040 7764300 -49.276
533180 7764300 -46.78
533330 7764300 -44.339
533480 7764300 -42.144
533620 7764300 -40.385
533770 7764300 -39.184
533910 7764300 -38.506
534060 7764300 -38.186
534210 7764300 -38.061
534350 7764300 -38.03
534500 7764300 -38.035
534640 7764300 -38.039
534790 7764300 -38.023
534940 7764300 -38.007
535080 7764300 -38.086
535230 7764300 -38.353
535370 7764300 -38.799
535520 7764300 -39.286
535670 7764300 -39.617
535810 7764300 -39.617
535960 7764300 -39.245
536100 7764300 -38.557
536250 7764300 -37.592
536400 7764300 -36.342
536540 7764300 -34.86
536690 7764300 -33.28
536830 7764300 -31.704
536980 7764300 -30.109
537130 7764300 -28.367
537270 7764300 -26.357
537420 7764300 -24.079
537560 7764300 -21.635
537710 7764300 -19.092
537860 7764300 -16.427
538000 7764300 -13.705
538150 7764300 -11.148
538290 7764300 -8.9255
538440 7764300 -7.097
538590 7764300 -5.748
538730 7764300 -4.9672
538880 7764300 -4.6794
539020 7764300 -4.7584
539170 7764300 -5.1609
539320 7764300 -5.8086
539460 7764300 -6.4102
539610 7764300 -6.6637
539750 7764300 -6.3609
539900 7764300 -5.4043
540050 7764300 -3.7987
540190 7764300 -1.5504
540340 7764300 1.3317
540480 7764300 4.7083
540630 7764300 8.3297
540780 7764300 11.945
540920 7764300 15.296
541070 7764300 18.019
541210 7764300 19.748
541360 7764300 20.366
541510 7764300 20.092
541650 7764300 19.042
541800 7764300 17.229
541940 7764300 14.831
542090 7764300 12.17
542240 7764300 9.5785
542380 7764300 7.2063
542530 7764300 5.0095
542670 7764300 3.0258
542820 7764300 1.3909
542970 7764300 0.053551
543110 7764300 -1.1714
543260 7764300 -2.3465
543400 7764300 -3.5168
543550 7764300 -4.8003
543700 7764300 -6.2928
543840 7764300 -7.9989
543990 7764300 -9.8614
544130 7764300 -11.745
544280 7764300 -13.439
544430 7764300 -14.776
544570 7764300 -15.726
544720 7764300 -16.342
544860 7764300 -16.743
545010 7764300 -17.075
545160 7764300 -17.399
545300 7764300 -17.698
545450 7764300 -17.965
545590 7764300 -18.233
545740 7764300 -18.535
545890 7764300 -18.854
546030 7764300 -19.125
546180 7764300 -19.277
546320 7764300 -19.245
546470 7764300 -18.965
546620 7764300 -18.377
546760 7764300 -17.433
546910 7764300 -16.105
547050 7764300 -14.422
547200 7764300 -12.479
547350 7764300 -10.371
547490 7764300 -8.2741
547640 7764300 -6.7243
  .
  .
  .
 new line
  .
  .
  .

Andre Vehreschild <v...@sc.rwth-aachen.de> wrote:
Hi,

> My problem is in writing the imaginary part into a separate column
> into a text file!

To split a complex number into its real and imaginary part use the real() and
imag() functions. Both accept vectors and give you a vector with the value of
the part of the complex number, respectively.

Now you can store the data in two ways. Either sequentially, or as a matrix.
For the sequential way use:

re= real(seg);
im= imag(seg);
save('fft2.dat', '-ascii', 're', 'im');

To do it in two columns concatenate the two vectors to a matrix and save the
matrix.

dest= [ real(seg), imag(seg) ];
save('fft2.dat', '-ascii', 'dest');

Beware you loss the imaginary 'i' in the number. You will only store the
values of the real and imaginary parts. I.e. 4+5i is stored as:

4.0 5.0
^^^
the i is missing!

Hope that helps. Greets,
Andre
--
Andre Vehreschild -- Institute for Scientific Computing, Aachen University
mailto:v...@sc.rwth-aachen.de , phone: ++49- 241- 80- 24874
GnuPG-key available at http://www.sc.rwth-aachen.de/vehreschild

------------
Yahoo! Mail - Gratis: 6 MB lagerplads, spamfilter og virusscan