Home /
Expert Answers /
Accounting /
matlab-question-3-write-a-function-that-takes-adjacency-matrix-representation-of-a-graph-and-checks-pa750
(Solved): Matlab? Question 3-Write a function that takes adjacency matrix representation of a graph and checks ...
Matlab?
Question 3-Write a function that takes adjacency matrix representation of a graph and checks if the graph is regular or not. Definition: A simple graph is said to be regular if every node has the same degree Adjanceny Matrix d a b ? d ao 1 1 0 b 1 0 0 1 ? 1 0 0 0 1 d 0 1 1 0 IMPORTANT NOTES: The examples under the questions are given in order to check your code, the code must run for different examples. Each solution of the questions will be posted in the following format. "Hwl_question.m Also, you must take a screenshot of your command window for each question. It must be fullscreen which shows the date on the screen. If you do not send screenshots of your solution, they will not be graded. Thus, even if you get an error or wrong answer, you must take a screenshot for a partial credit. Example: 1 1 1 Baca
Implementation of the given problem in MATLAB: % function to check if the given adjacency matrix is regular or not function checkRegular(A) [m, n] = size(A); % get size of adjacency matrix count = 0; for i