// Call helper functions void matrixTranspose(float A[][3], float A_trans[][3]); void matrixVectorMultiplication(float A[][3], float B[][1], float C[][1]); void matrixMultiplication(float A[][3], float B[][3], float C[][3]); void rotationMatrix(float theta, float R[3][3], char axis); // Define matrices as global variables // 3x3 matrices float mat_A[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; float mat_B[3][3] = {{9, 8, 7}, {6, 5, 4}, {3, 2, 1}}; float mat_A_trans[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize float mat_C[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize float mat_D[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize float Rx[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize float Ry[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize float Rz[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; // Initialize // 3x1 vectors float vec_a[3][1] = {{1}, {2}, {3}}; float vec_b[3][1] = {{0}, {0}, {0}}; // Initialize // Rotation angles in radians float theta_x = 0.1; float theta_y = 0.2; float theta_z = 0.3; // Get A transpose matrixTranspose(mat_A, mat_A_trans); // Get b = A*a matrixVectorMultiplication(mat_A, vec_a, vec_b); // Get C = A*B matrixMultiplication(mat_A, mat_B, mat_C); // Get D = B*A matrixMultiplication(mat_B, mat_A, mat_D); // Get rotation matrices rotationMatrix(theta_x, Rx, 'x'); // Rotation about x-axis rotationMatrix(theta_y, Ry, 'y'); // Rotation about y-axis rotationMatrix(theta_z, Rz, 'z'); // Rotation about z-axis