Question: It is often necessary to find values in a data set that meet certain criteria so that you can do some calculation with only those
It is often necessary to find values in a data set that meet certain criteria so that you can do some calculation with only those data. For this problem, you will design and write a matlab program that finds the n smallest natural numbers (positive integers) that are evenly divisible by both a and b (where n, a and b are also natural numbers) it should also calculate and report (to two decimal places) the sum of square roots of the numbers meeting the criteria. The program must work for any n, a and b provided by the user. The only built-in function (other than standard mathematical operators) that you may use in your design is the rem function, which calculates the remainder after division. Specifically, rem(x,y) returns the remainder of x divided by y. In your program, design a user-defined function to perform the needed selection and calculations, but use a parent script to get input and provide results to the user(and call the function)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
