Linear Algebra and the C Language/a0kw
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
double **X_m1_mR(
double **One
)
{
int r;
int c;
for ( r=R1; r<One[R_SIZE][C0]; r++)
for ( c=C1; c<One[C_SIZE][C0]; c++)
One[r][c] = 1.;
return(One);
}
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double **M1 = m1_mR(i_mR(R5,C6));
clrscrn();
printf(" M1:");
p_mR(M1, S4,P0,C6);
stop();
f_mR(M1);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
M1:
+1 +1 +1 +1 +1 +1
+1 +1 +1 +1 +1 +1
+1 +1 +1 +1 +1 +1
+1 +1 +1 +1 +1 +1
+1 +1 +1 +1 +1 +1
Press return to continue.