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 myfactors which determines all the factors of a random integer, N without using builtin MATLAB functions for this purpose egfactor Your program should:
Work for any positive, nonzero integer and check that it is positive
Generate an array called factors which contains all the nonzero positive integers m for which Nm produces an integer.
NOT use any built in functions for finding factors
Accept a second input a or to determine whether to return the factors in a row or column vector as shown below. If anything besides a or 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
