Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matrix_Utils.c C program help. Hello, I am stumped with this problem and I do not know where to go. I am in an introductory programming

Matrix_Utils.c C program help.

Hello,

I am stumped with this problem and I do not know where to go. I am in an introductory programming class in C language and I have this problem due later in the week.

It is quite lengthy so I have included a screen grab. Please note: all functions must be implemented exactly as they are stated in the problem to recieve credit, also I am using C LANGUAGE.

Thank you very much.

image text in transcribed

2. Matrix Utilities (matrix.utils c) A matrix is a two dimensional array. It can also be descried as a pointer to a pointer or In the product function you will find the matrix product of multiplying two matrices an array of pointers. In this program we will write several small utilitiy functions to test together. Function takes two matrices and a size integer and returns a new matrix that is the result of matrix multiplicati ion. Matrix multiplication is done as follows: mastery of this concept. The function signatures and descriptions follow below. Also u will want to include the stdbool.h header file for this exercise that contains the definition of a an enumerated type named "bool" should only two values: true and be a square matrix meaning false. You may make the assumption that the matrix w A x B that the number of rows equals the number of columns in the matrix. The entries for C Implement these functions: make Matrix int n) int void printMatrix(int A, int na where is i, S n and cu is he (ij)-th entry of the matrix C. bool sumalEqual(int A, int eB, int n) Example (product): bool isEqual Cint A, int B, int n); int diagonal (int eeA, int n intee sunMatrix (int A int B, int n) int product int .A, int B, int n Please read the description of these functions carefully. The make Matrix function should dynamically allocate memory for a matrix of si and allow the user to enter values for each position of the matrix from left to right row by row then return the created matrix to the main function. The print Matrix function should print out a matrix row by row legibly enough so that a grader can see which number corresponds to each position of the matrix. In the sumEqual function you will sum up all the elements in each matrix and see if the sum of each array is equal to one another. The function returns true if the sums are equal or returns false if the sums do not equal one another. Function takes two d a size matrices an Example (sumEqual): 1 2 3 4 In the isEqual function you will check each matrix element by element and see if each element matrix A is equal to its corresponding element in Matrix B. Return true if this is the case and false if even one element is not equal to its corresponding element in he other matrix. Function takes two matrices and a size Example (isEqual): Your main function should prompt the user to input the size of the two matrices, and hen create the two matrices by calling appropriate functio Them it should call the following functies the town matriere: Fgnal, isFqual, diagnnal, Matri Sample output from the program: 3 4 ter val matrix A In the diagonal function you will calculate the product of the elements along the diagonal of the matrix and return that number. Function takes a single matrix and an integer size of that matrix and returns the product. Matrix A 3 4 Enter values or natrix B Example (diagonal): Sun of enents in each trix is equal Matrix function you will find the summation of the two matries Matrix integer and retums matrix that is the element by element sammation. The product along the diagonal A and B Example (sum Matrix 67 3 4 The product o matrix A and B is 55

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions