Question: For discrete math Need solution in Matlab First pic is main function 2nd pic is sub function nstructions: Complete the following tasks. Copy and paste
nstructions: Complete the following tasks. Copy and paste your code and analysis into a PDF/Doc ent (ike a lab report). Also upload any script files that you write to solve the problems. In lecture, we went through an example of finding an Circuit for a given graph. We also looked at MATLAB code for an algorithm Euler The algorithm is in the textbook, but in MATLAB, it looks that would do it for us. like this: function Circuit Euler (EG) s You pass an nx2 matrix EG into Euler containing the edges of the graph G The function returns a sequence of edges forming an Euler circuit Circuit Makecircuit (EG, 1) Makes a circuit starting at edge 1 EH Remove Edges (EG, Circuit) $Removes edges in circuit from EG while length (EH) tv, n] Findvertex (circuit, EH) Find a vertex that is in circuit and EH Subcircuit Circuit Make Circuit (EH v); s Makes a circuit starting at edge EH Mergecircuits (Circuit subcircuit, n) EAdds the subcircuit to the circuit RemoveEdges (EH, SubCircuit) end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
