Aller au contenu

Mathc matrices/h05c

Un livre de Wikilivres.
Version datée du 27 août 2021 à 23:09 par Xhungab (discussion | contributions) (petit modification)


Sommaire

Installer ce fichier dans votre répertoire de travail.

vpoctave.h
/* ------------------------------------ */
/*  Save as :   vpoctave.h                   */
/* ------------------------------------ */ 
void p_octave_mR(
double  **A,
char name[9],
int e,
int d
)
{
 int r;
 int c;

 printf(" %s=[\n",name);

 for(r=R1; r<A[R_SIZE][C0];    r++)
  {
   for (c=C1; c<A[C_SIZE][C0]; c++)
     printf("%+*.*f,",e,d,A[r][c]);

   if((r+1)<A[R_SIZE][C0]) printf("\b;\n");
   else                       printf("\b]\n\n");
  }
}
/* ------------------------------------ */   
void p_octave_mR_E(
double  **A,
char name[9],
int e,
int d
)
{
 int r;
 int c;

 printf(" %s=[\n",name);

 for(r=R1; r<A[R_SIZE][C0];    r++)
  {
   for (c=C1; c<A[C_SIZE][C0]; c++)
     printf("%+*.*e,",e,d,A[r][c]);

   if((r+1)<A[R_SIZE][C0]) printf("\b;\n");
   else                    printf("\b]\n\n");
  }
}
/* ------------------------------------ */ 
/* ------------------------------------ */

Une matrice pour octave.