Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:11:15+00:00 2026-05-31T06:11:15+00:00

I wrote some code to solve the general eigenvalue problem and now I am

  • 0

I wrote some code to solve the general eigenvalue problem and now I am comparing my results against LAPACK’s DSPGVX function. I just worked with this example.

So I obtained the 4 auto vectors

{
 {-0.0319133, -0.265466, -0.713483,  0.64765},
 {-0.425628,  -0.520961, -0.714215,  0.193227},
 { 0.32702,    0.565845, -0.37129,  -0.659561},
 {-0.682699,  -0.056645,  0.0771025, 0.724409}
}

and auto values

{-2.22545, 1.12704, -0.454756, 0.100076}

both with my code and with Mathematica and results agree.

But in the previous link, auto vectors reported from LAPACK are completely different.

 Eigenvalues
    -0.4548  0.1001
 Selected eigenvectors
          1       2
 1   0.3080  0.4469
 2   0.5329  0.0371
 3  -0.3496 -0.0505
 4  -0.6211 -0.4743

Whom should I trust?

P.S. I also checked that my auto values/autovectors are correct since they yield A*x-lambda*B*x=0, while the values from LAPACK do not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:11:17+00:00Added an answer on May 31, 2026 at 6:11 am

    It looks like DSGPVX is solving A*lambda = B*x*lambda; Matlab gives the DSGPVX solution to your problem using “eig”, though Matlab’s documentation is correct. My guess is this a bug in the DSGPVX documentation.

    >> a=[0.24 0.39 0.42 -0.16;0.39 -0.11 0.79 0.63;0.42 0.79 -0.25 0.48;-0.16 0.63 0.48 -0.03];
    >> b=[4.16 -3.12 0.56 -0.1;-3.12 5.03 -0.83 1.09;0.56 -0.83 0.76 0.34;-0.1 1.09 0.34 1.18];
    >> [v,d]=eig(a,b)
    
    v =
    
       -0.0690    0.3080   -0.4469   -0.5528
       -0.5740    0.5329   -0.0371   -0.6766
       -1.5428   -0.3496    0.0505   -0.9276
        1.4004   -0.6211    0.4743    0.2510
    
    
    d =
    
       -2.2254         0         0         0
             0   -0.4548         0         0
             0         0    0.1001         0
             0         0         0    1.1270
    
    >> norm(a*v-b*v*d)
    
    ans =
    
       1.5001e-15
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just wrote some code to test the behavior of std::equal, and came away
I wrote a Haskell code which has to solve the following problem : we
I wrote some code with a lot of recursion, that takes quite a bit
I wrote some code recently (ISO/ANSI C), and was surprised at the poor performance
I wrote some code to read a file in my Java Servlet class. (I'm
I wrote some code which monitors the output of Stopwatch using a tight loop.
I wrote some code (Java and LDAP) to create a user in the Active
I wrote some code for the ising model in python (2d). Everything looks seems
I wrote some code today and It was changed by another developer who said
I'm very new to C#. My boss asked me to wrote some code using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.