Mathc complexes/Fichiers h : vpm
Apparence
Installer ce fichier dans votre répertoire de travail.
wpm.h |
---|
/* ------------------------------------ */
/* Save as : wpm.h */
/* ------------------------------------ */
double **p_mZ(
double **A,
int Sr,
int Pr,
int Si,
int Pi,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = R1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*f%+*.*fi ",Sr,Pr,A[r][c],Si,Pi,A[r][c+C1]);
}
printf("\n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
double **pE_mZ(
double **A,
int Sr,
int Pr,
int Si,
int Pi,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = R1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*e%+*.*ei ",Sr,Pr,A[r][c],Si,Pi,A[r][c+C1]);
}
printf("\n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **P_mZ(
double **A,
int Sr,
int Pr,
int Si,
int Pi,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = R1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*f,%+*.*f, ",Sr,Pr,A[r][c],Si,Pi,A[r][c+C1]);
}
printf("\b\b \n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
double **PE_mZ(
double **A,
int Sr,
int Pr,
int Si,
int Pi,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = R1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*e,%+*.*e, ",Sr,Pr,A[r][c],Si,Pi,A[r][c+C1]);
}
printf("\b\b \n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **p_mRZ(
double **A,
int Sr,
int Pr,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = C1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*f ",Sr,Pr,A[r][c]);
}
printf("\n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
double **pE_mRZ(
double **A,
int Sr,
int Pr,
int Cn
)
{
int r;
int c;
int n_c;
int n_c_LAST;
int n_c_FIRST;
n_c = C1;
while(n_c<A[C_SIZE][C0])
{
n_c+=Cn*C2;
n_c_FIRST = n_c-Cn*C2;
if(n_c<A[C_SIZE][C0])n_c_LAST = n_c;
else n_c_LAST = A[C_SIZE][C0];
for(r=R1; r<A[R_SIZE][C0]; r++)
{
printf("\n");
for (c=n_c_FIRST; c<n_c_LAST; c+=C2)
printf("%+*.*e ",Sr,Pr,A[r][c]);
}
printf("\n");
}
printf("\n");
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
Ces fonctions permettent d'imprimer une matrice à l'écran.
On peut contrôler la taille des colonnes, le nombre de chiffres après la virgule, le nombre de colonnes par ligne.