[Scilab-users] Spec function

classic Classic list List threaded Threaded
3 messages Options
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Spec function

This question is about how to use the spec function to calculate eigenvalues.
Suppose a square matrix D is a function of real number b.
I am trying to find the eigenvalues of D for various b with the spec
function.
When I calculate for b = 1 and 3 simultaneously with the attached code, I
get all eigenvalues for b = 1 are 0.
However, I calculate for b = 1 alone , I get an eigenvalue of -0.5 ± 4.97i
and 0 otherwise.
Why are the results of the two methods different? Is the usage of the spec
function wrong? Which result is correct?

Best regards

testSpec.sce <http://mailinglists.scilab.org/file/t497065/testSpec.sce>  



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Spec function

Hi,

In the sample code provided, the loops 'for j=length(b_V)', seem to only evaluate the case b=3.
It does not seem to match the explanation below.

Regards,
Rafael


From: users <[hidden email]> On Behalf Of fujimoto2005
Sent: Friday, May 22, 2020 4:06 PM
To: [hidden email]
Subject: [Scilab-users] Spec function

This question is about how to use the spec function to calculate eigenvalues.
Suppose a square matrix D is a function of real number b.
I am trying to find the eigenvalues of D for various b with the spec
function.
When I calculate for b = 1 and 3 simultaneously with the attached code, I
get all eigenvalues for b = 1 are 0.
However, I calculate for b = 1 alone , I get an eigenvalue of -0.5 ± 4.97i
and 0 otherwise.
Why are the results of the two methods different? Is the usage of the spec
function wrong? Which result is correct?

Best regards

testSpec.sce <http://mailinglists.scilab.org/file/t497065/testSpec.sce>  


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
fujimoto2005 fujimoto2005
Reply | Threaded
Open this post in threaded view
|

Re: Spec function

Dear Rafael,
Thanks for your reply.
You are  right.
It's due to my wrong code.
Best regards,
Masahiro Fujimoto

2020年5月25日(月) 15:18 Rafael Guerra <[hidden email]>:
Hi,

In the sample code provided, the loops 'for j=length(b_V)', seem to only evaluate the case b=3.
It does not seem to match the explanation below.

Regards,
Rafael


From: users <[hidden email]> On Behalf Of fujimoto2005
Sent: Friday, May 22, 2020 4:06 PM
To: [hidden email]
Subject: [Scilab-users] Spec function

This question is about how to use the spec function to calculate eigenvalues.
Suppose a square matrix D is a function of real number b.
I am trying to find the eigenvalues of D for various b with the spec
function.
When I calculate for b = 1 and 3 simultaneously with the attached code, I
get all eigenvalues for b = 1 are 0.
However, I calculate for b = 1 alone , I get an eigenvalue of -0.5 ± 4.97i
and 0 otherwise.
Why are the results of the two methods different? Is the usage of the spec
function wrong? Which result is correct?

Best regards

testSpec.sce <http://mailinglists.scilab.org/file/t497065/testSpec.sce


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users