Question: MATLAB Problem 4: Write a function divisibility.m that checks the divisibility of a given number by 3, 5, 7, 11 and 13, The function should
Problem 4: Write a function divisibility.m that checks the divisibility of a given number by 3, 5, 7, 11 and 13, The function should have the following declaration: function div = divisibility (a) where a is a number input and div is a logical vector output. Vector div should have 5 elements corresponding to the divisibility by 3, 5, 7, 11 and 13, respectively For example, the output of divisibility(14) would be [O 0 1 0 0]. The function should also include a description. Use if statement (a) Set p4azevalc('help divisibility') (b) Check the divisibility of 66 and set the answer to p4b (c) Check the divisibility of 385 and set the answer to p4c (d) Check the divisibility of 3855 and set the answer to p4d (e) Check the divisibility of 232155 and set the answer to p4e (f) Check the divisibility of 233155 and set the answer to p4f
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
