Fortran equivalent to Matlab's eig() function
  Home FAQ Contact Sign in
comp.lang.fortran only
 
Advanced search
POPULAR GROUPS

more...

comp.lang.fortran Profile…
 Up
Fortran equivalent to Matlab's eig() function         


Author: Dave
Date: Sep 8, 2008 08:12

I'm trying to convert some Matlab code into Fortran 77, as Matlab
takes days to solve the multiple finite difference systems I need to
solve for. All the Matlab code transfers relatively easily into F77,
except for the main solution function (which Matlab makes super
easy). I'm not sure if there's some ready-made code I can cut and
paste into the F77 program, but essentially I'm trying to substitute
for the following line:

[V,D]=eig(A,B,'qz')

Where

Does anyone have any suggestions or advice for how I can implement
that in F77?

Thanks in advance!
Dave
15 Comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Jörgen Tegnér
Date: Sep 8, 2008 09:03

On Mon, 08 Sep 2008 08:12:26 -0700, Dave wrote:
> program, but essentially I'm trying to substitute for the following
> line:
>
> [V,D]=eig(A,B,'qz')
>
> Where
>
> Does anyone have any suggestions or advice for how I can implement that
> in F77?
>
> Thanks in advance!
> Dave

Jörgen
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Dave
Date: Sep 8, 2008 09:15

Fantastic. That looks exactly like what I need.

Thanks!
Dave
Show full article (0.52Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Gary Scott
Date: Sep 8, 2008 18:21

Jörgen Tegnér wrote:
> On Mon, 08 Sep 2008 08:12:26 -0700, Dave wrote:
>
>
>>program, but essentially I'm trying to substitute for the following
>>line:
>>
>>[V,D]=eig(A,B,'qz')
>>
>>Where
>>
>>Does anyone have any suggestions or advice for how I can implement that
>>in F77?
>>
>
>
> Possibly http://www.netlib.org/lapack/double/dhgeqz.f is what you need.

Good heavens, what a (stylistic) mess...idea for a new TV show: Fortran
Makeover, Bedrock Edition
Show full article (0.88Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Ron Ford
Date: Sep 8, 2008 21:02

On Mon, 08 Sep 2008 20:21:31 -0500, Gary Scott posted:
Show full article (1.30Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: paya
Date: Sep 9, 2008 03:12

If your matrix is sparse (as from finite differences it usually is),
you should use a sparse eigenvalue problem solver, such as e.g.
ARPACK:

http://www.caam.rice.edu/software/ARPACK/

Moreover, sparse matrices are nowadays also very large, so using dense
LAPACK in this case can lead to not so large improvements of the
solution time in comparison with MATLAB.
Show full article (1.01Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Gordon Sande
Date: Sep 9, 2008 05:58

On 2008-09-09 01:02:58 -0300, Ron Ford said:

Show full article (1.72Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Ron Ford
Date: Sep 9, 2008 12:16

On Tue, 09 Sep 2008 12:58:19 GMT, Gordon Sande posted:
> On 2008-09-09 01:02:58 -0300, Ron Ford said:
>
>
>
>> I never have 2 matrices lying around, where both are almost triangular for
>> different reasons.
>>
>> *
>> * Purpose...
Show full article (2.36Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: Gordon Sande
Date: Sep 9, 2008 13:26

On 2008-09-09 16:16:39 -0300, Ron Ford said:
> On Tue, 09 Sep 2008 12:58:19 GMT, Gordon Sande posted:
>
>> On 2008-09-09 01:02:58 -0300, Ron Ford said:
>>
>>
>>
>>> I never have 2 matrices lying around, where both...
Show full article (3.02Kb)
no comments
Re: Fortran equivalent to Matlab's eig() function         


Author: nospam
Date: Sep 9, 2008 14:32

Gordon Sande worldnet.att.net> wrote:
> On 2008-09-09 16:16:39 -0300, Ron Ford said:
>
>> On Tue, 09 Sep 2008 12:58:19 GMT, Gordon Sande posted:
>
>>> Sight unseen I would be willing to take a small bet that MatLab...
Show full article (3.29Kb)
no comments
1 2