Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATLAB Language! 3) Write a function matcheckeven to receive one integer matrix

ID: 644915 • Letter: M

Question

MATLAB Language!

3) Write a function matcheckeven to receive one integer matrix (could be any size), and generate a same size matrix B made of ''0'' or ''1'' using for loops, determined by whether the corresponding element is even or odd. If the element in the input matrix is an even number, then the corresponding element is 0; if the element in the input matrix is an odd number, then the corresponding element is 1. Input matrix output matrix (2 4 6 1 0 5 11 13 15) ---> (0 0 0 1 0 1 1 1 1) function [ ] = matcheckeven (mat)

Explanation / Answer

void matcheckeven(matrix[SIZE][SIZE], int row, int column)

{

int newmatrix[SIZE][SIZE];