Question: Develop a MATLAB function divisibleBy 3 ( N ) to determine if a given integer N is divisible by 3 using the following rule: if
Develop a MATLAB function divisibleBy to determine if a given integer is divisible by using the following rule: if the sum of the digits is
divisible by then the integer is divisible by
Only integer values should be considered valid inputs. Create a check of for floating point values and give a warning if one is input.
Make a test script that calls your function repeatedly and checks the results. Use a simple mod N function call to check the result, which will be if
divisible by Create a print statement to report the result of each examined.
In your test script call your function with a noninteger like ; it should give a warning and the odd numbers
Capture the results in the command window with a screenshot.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
