Question: Create a function my _ factors which determines all the factors of a random integer, N , without using built - in MATLAB functions for

Create a function my_factors which determines all the factors of a random integer, N, without using built-in MATLAB functions for this purpose (e.g.,factor()). Your program should:
Work for any positive, non-zero integer (and check that it is positive)
Generate an array called factors which contains all the non-zero positive integers m, for which N/m produces an integer.
NOT use any built in functions for finding factors
Accept a second input (a 1 or 2) to determine whether to return the factors in a row or column vector as shown below. If anything besides a 1 or 2 is inputted, return a row vector with an error message

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 Programming Questions!