[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Svdc_complex
- Subject: Re: Svdc_complex
- From: Javier Sanchez Gonzalez <jsanchez(at)gbt.tfo.upm.es>
- Date: Fri, 02 Jul 1999 09:56:14 +0100
- Newsgroups: comp.lang.idl-pvwave
- Organization: RedIRIS
- References: <377BA376.641047B8@gbt.tfo.upm.es>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:15525
Hi all,
if somebody wants to test this I send the procedure to calculate the
singular value of a complex matrix.
pro svdc_complex, M, Ew2, Eu2, Ev2
xdim=(size(M))(1)
ydim=(size(M))(2)
Ew2=complexarr(xdim)
Eu2=complexarr(xdim,ydim)
Ev2=complexarr(xdim,ydim)
M2=dblarr(2*xdim,2*ydim)
M2(0:xdim-1,0:ydim-1)=double(M)
M2(xdim:2*xdim-1,0:ydim-1)=-imaginary(M)
M2(0:xdim-1,ydim:2*ydim-1)=imaginary(M)
M2(xdim:2*xdim-1,ydim:2*ydim-1)=double(M)
catch, Error_status
if Error_status ne 0 then begin
; print, !err_string
Minv=0.*transpose(M)
end else begin
svdc, m2,w,u,v,/double
for i=0, xdim-1 do begin
Ew2(i)=w(2*i)
Eu2(i,*)=u(2*i,0:ydim-1)+dcomplex(0,1)*u(2*i,ydim:2*ydim-1)
Ev2(i,*)=v(2*i,0:ydim-1)+dcomplex(0,1)*v(2*i,ydim:2*ydim-1)
endfor
end
end
Thanks all
Javier Sanchez Gonzalez