Mathc matrices/00c
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **U = r_mR( i_mR(R1, r),9);
double **V = r_mR( i_mR(r ,C1),9);
double **A = rHankel_mR(U,V,i_mR(r , r) );
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,C7);
eigs_mR(A,EigsValue);
printf(" EigsValue :");
p_mR(EigsValue,S13,P6,C1);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(EigsVector);
f_mR(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R5)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de Hankel.
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
-1,+1,-3,-3;
+1,-3,-3,+8;
-3,-3,+8,-7;
-3,+8,-7,-7]
[V, E] = eigs (a,4)
Press return to continue.
EigsVector:
+0.254363 -0.112817 +0.596520 +0.752819
-0.505074 -0.363671 +0.665847 -0.411450
+0.211066 +0.827132 +0.432582 -0.290131
+0.797277 -0.413361 +0.116981 -0.424024
EigsValue :
-14.878233
+13.226483
-2.647628
+1.299379
Press return to continue
Press X return to stop