411 REFERENCE · Wikibooks
Linear Algebra and the C Language/a0ff
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
__NOTOC__
Copy a matrix
Copy an array of numbers into a matrix:
ca_A_mR();
Copy a number into a matrix:
c_s_mR();
Copy a matrix A into a matrix B:
c_mR();
Copy rows and columns
Copy a column or row from matrix A into matrix B :
c_c_mR();
c_r_mR();
Copy a column (row) of matrix A into a row (column) of matrix B:
c_c_r_mR();
c_r_c_mR();
Copy a row R1 into row R2 of a matrix:
c_r1r2_mR();
Copy n rows of a matrix A into a matrix B:
c_nr_mR(A,nR, B);
Copy a diagonal matrix into a one-column matrix:
c_D_c_mR(D,U);
Copy a column matrix into a diagonal matrix:
c_c_D_mR(U,D);
Gauss-Jordan Utilities
Copy A and b into Ab:
c_A_b_Ab_mR();
Copy A from Ab to A, and b from Ab to b:
c_Ab_A_mR(); ... c_Ab_b_mR();
Copy the submatrix of Ab into subA:
c_Ab_subArxr_mR();
Copy b of the system Ab into the matrix invA:
c_Inv_A_mR();
Index Matrix Utilities (R0)
Copy a matrix with row zero (R0: column position index):
c_withR0_mR(A,B);
Copy a column with its index into another column:
c_c_withR0_mR(A,C1, B,C2);
Other utilities
Copy the row vector U in reverse order:
c_r_reverse_order_mR(U,V);
Copy vector U into A as a Hankel matrix:
c_Uc_r_mR(U,Cn, A,R2);