Linear Algebra and the C Language/a0h7
Install and compile this file in your working directory.
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **U = r_mR( i_mR(R1, r),9);
double **V = r_mR( i_mR(r ,C1),9);
double **A = rHankel_mR(U,V, i_mR(r , r) );
double **EigsValue = i_mR(r,C1);
clrscrn();
printf(" Copy/Paste into the octave windows \n\n");
p_Octave_mR(A,"a",P0);
printf(" eigs (a,%d)\n\n",r);
eigs_mR(A,EigsValue);
printf(" EigsValue: The eigenvalues ββare real");
p_mR(EigsValue, S13,P6,C1);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(R5);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Screen output example:
Copy/Paste into the octave windows
a=[
+1,-5,+1,+6,-7;
-5,+1,+6,-7,+2;
+1,+6,-7,+2,-8;
+6,-7,+2,-8,+6;
-7,+2,-8,+6,-9]
eigs (a,5)
EigsValue: The eigenvalues ββare real
-23.274918
+11.166145
-8.895217
-5.881985
+4.885975
Press return to continue
Press X return to stop