Linear Algebra and the C Language/a0f0
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA RC4
#define ARRAY A5
/* ------------------------------------ */
void fun(void)
{
int i;
double **A[ARRAY];
for(i = A0; i < ARRAY; i++)
{
clrscrn();
A[i] = rE_mR(i_mR(RCA,RCA),999,+1.E-3);
printf(" Scientific notation.\n\n"
" Copy/Paste into the octave window.\n\n");
pEAi_Octave_mR(A[i], "A",i, P3);
printf(" expm (A%d)\n\n\n",i);
stop();
}
for(i = A0; i < ARRAY; i++)
f_mR(A[i]);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
Scientific notation.
Copy/Paste into the octave window.
A0=[
-6.520e-01,+5.260e-01,-8.210e-01,-1.270e-01;
+3.140e-01,+1.110e-01,-7.730e-01,+8.430e-01;
-8.010e-01,+9.140e-01,-4.730e-01,-3.850e-01;
-1.820e-01,-2.400e-01,+2.750e-01,+7.510e-01]
expm (A0)
Press return to continue.
Scientific notation.
Copy/Paste into the octave window.
A1=[
-9.000e-02,+5.410e-01,+4.260e-01,+6.130e-01;
+3.740e-01,+4.150e-01,-6.250e-01,+9.470e-01;
+3.030e-01,+4.390e-01,-9.830e-01,+2.650e-01;
-9.630e-01,+3.520e-01,+4.200e-02,-6.020e-01]
expm (A1)
Press return to continue.
Scientific notation.
Copy/Paste into the octave window.
A2=[
-9.800e-02,-7.610e-01,+2.470e-01,-9.800e-01;
-8.160e-01,+4.850e-01,+9.000e-02,-5.860e-01;
-7.320e-01,-8.860e-01,-5.670e-01,-3.700e-02;
+9.300e-02,+9.240e-01,+2.090e-01,-9.840e-01]
expm (A2)
Press return to continue.