Question: in matlab please help with this function 6 Greatest Common Divisor (GCD) Input a b Output function GCD = greatestCommonDivisor(a, b) Type Description lxl double

in matlab please help with this function
in matlab please help with this function 6 Greatest Common Divisor (GCD)

6 Greatest Common Divisor (GCD) Input a b Output function GCD = greatestCommonDivisor(a, b) Type Description lxl double an integer greater than or equal to 0 1x1 double an integer greater than or equal to 0 Type Description 1x1 double the GCD of a and b | O GCD Details Recall that the greatest common divisor (GCD) is the largest positive integer that evenly divides two integers. In this problem, you will write a function that recursively finds the GCD of two input integers. Do not use the built-in MATLAB function ged(). Tips The GCD of two integers should not change if the smaller integer is subtracted from the bigger integer Don't forget to program in for cases where a or b=0. If a and b are both equal to zero, your program should display(disp) a message to remind users that the input is invalid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!