comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how read a file of complex?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how read a file of complex? [message #10633] Fri, 02 January 1998 00:00
Ferdinando Iavarone is currently offline  Ferdinando Iavarone
Messages: 10
Registered: October 1997
Junior Member
Hi all,
HAPPY NEW YEAR.

I have a data-file containing a matrix. Each element of matrix has the
form
(real part, imaginary part)[1] with each one LONG.

1) How create a matrix with structure [1] to read in a single pass the
file?
2) I tried with a pro of type reported below (probably very slow for
giant matrix), but after execution IDL results blocked

(I work with IDL 5.0 /windows 95)
Thank

pro prova,n,m,nomefile,immagine
tmp1=0l
tmp2=0l
re=lonarr(n,m)
im=lonarr(n,m)
openr,1,nomefile
for i=0,n-1 do begin
for j=0,m-1 do begin
readu,1,tmp1,tmp2
re(i,j)=tmp1
im(i,j)=tmp2
endfor

endfor

immagine=complex(re,im)
close,/all
end


--


Nando Iavarone

Laureando Gruppo Telerilevamento

Dipartimento Interateneo di Fisica
Via Amendola, 173
70126 BARI
ITALY

Tel.: +39 80 5443166
Fax.: +39 80 5443165

e_mail: iavarone@axpba0.ba.infn.it
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: widget_font problem
Next Topic: Re: how read a file of complex?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:53:13 PDT 2025

Total time taken to generate the page: 0.00391 seconds