Linear Algebra and the C Language/a01p
Install this file in your working directory.
/* ------------------------------------ */
/* Save as : vg_i.h */
/* ------------------------------------ */
double **i_Abr_Ac_bc_mR(
int Ab_r,
int A_c,
int b_c
)
{
double **Ab;
if( Ab_r < R2 || A_c<C2 || b_c<C1)
{
printf(" Error : double **i_Abr_Ac_bc_mR(); \n\n");
printf(" A_c, b_c must be : Ab_r < R2 || A_c<C2 || b_c<C1 \n\n");
printf(" This matrix is to study linear sytem.\n\n");
fflush(stdout);
getchar();
exit(EXIT_FAILURE);
}
Ab = i_mR( Ab_r,A_c+b_c);
/* size of A into Ab */
Ab[C_SIZE_A][C0] = A_c+C1;
return(Ab);
}
/* ------------------------------------ */
/* ------------------------------------ */
/* ------------------------------------ */
double **Ab = i_Abr_Ac_bc_mR(RAb,CA,Cb);
create a new matrix Ab :
- With RAb rows
- With A which has CA columns
- With b which has Cb columns
double **Ab = i_Abr_Ac_bc_mR(R4, C4, C1 ); Ab[R4, C4+C1] = Ab[R4, C5]