Mathc matrices/c11an
Valeurs propres. Vecteurs propres
Installer et compiler ces fichiers dans votre répertoire de travail.
c0a1.c |
---|
/* ------------------------------------ */
/* Save as : c0a1.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rsymmetric_mR(i_mR(r,r),999.);
double **EigsVector= i_mR(r,r);
double **EigsValue = i_mR(r,C1);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mR(A,"a",P0);
printf(" [V, E] = eigs (a,%d) \n\n",r);
stop();
clrscrn();
eigs_V_mR(A,EigsVector);
printf(" EigsVector:");
p_mR(EigsVector,S5,P6,C6);
eigs_mR(A,EigsValue);
printf(" EigsValue :");
p_mR(EigsValue,S13,P6,C1);
f_mR(A);
f_mR(EigsVector);
f_mR(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
/* ------------------------------------ */
Copy/Past into the octave windows
a=[
+154,+718,-817,+976,+936,+563;
+718,-161,+832,-766,+258,-103;
-817,+832,-815,-623,+921,-967;
+976,-766,-623,+682,-105,+65;
+936,+258,+921,-105,+600,+53;
+563,-103,-967,+65,+53,+998]
[V, E] = eigs (a,6)
Press return to continue.
EigsVector:
+0.482973 +0.446188 +0.490914 -0.400542 -0.119798 +0.389733
-0.132397 -0.204168 +0.416761 +0.371631 +0.199439 +0.661563
+0.677265 -0.441802 +0.236186 +0.516092 -0.088031 -0.127582
-0.331198 +0.532277 -0.058586 +0.549047 -0.627906 -0.000250
+0.108351 -0.039156 +0.723115 -0.093991 -0.112758 -0.586742
-0.411204 +0.528385 +0.056579 +0.353297 +0.728796 -0.223383
EigsValue :
-2386.272428
+2383.314298
+1697.609699
-1074.297566
+929.869717
-92.223719
Press return to continue
Press X return to stop