< Mathc matrices


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.

Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.