Mathc matrices/c11a4
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
c0a4.c |
---|
/* ------------------------------------ */
/* Save as : c0a4.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(void)
{
double ab[R4*C4]={
+138,-131,+744,-389,
-131,-187,+674,-799,
+744,+674,+530,+152,
-389,-799,+152,-337
};
int r = RC4;
double **A = ca_A_mR(ab,i_mR(r,r));
double **EignVector= 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",S1,P0);
printf(" [V, E] = eigs (a,10) \n\n");
stop();
clrscrn();
eignVectoruv_mR(A,EignVector);
printf(" EignVector:");
p_mR(EignVector,S5,P6,C6);
eigsuv_mR(A,EigsValue);
printf(" EigsValue :");
p_mR(EigsValue,S13,P6,C1);
stop();
f_mR(A);
f_mR(EignVector);
f_mR(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Déclaration des fichiers h. Exemple de sortie écran :
/* ------------------------------------ */
Copy/Past into the octave windows
a=[
+138,-131,+744,-389;
-131,-187,+674,-799;
+744,+674,+530,+152;
-389,-799,+152,-337]
[V, E] = eigs (a,10)
Press return to continue.
/* ------------------------------------ */
EignVector:
+0.367227 +0.486248 +0.369032 +0.701799
+0.603197 +0.406700 -0.633067 -0.264528
-0.382600 +0.735498 +0.304043 -0.469273
+0.595747 -0.239165 +0.608769 -0.466139
EigsValue :
-1483.394020
+1345.136626
+333.995260
-51.737866
Press return to continue.