Question: Please anwer question number 2 Every positive integer can be written (uniquely) as a product of prime factors. For example, see the table below. In

Please anwer question number 2
Every positive integer can be written (uniquely) as a product of prime factors. For example, see the table below. In the first column, several integers are expressed in standard mathematical notation as products of their respective prime factors. In the second column, that prime factorization has been re-structured as a matrix. Your job in this problem is to re-construct a positive integer if given its prime factorization (in matrix form as shown in the table above). Write a Matlab function called makeintf.m which takes a matrix (as structured in the table above) as input, and produces a positive integer as output. Use a for loop in your code to accomplish this task. The function specifications and some sample function calls are shown in the tables below. input parameter pfmat a matrix representing the prime factorization of an integer output parameter theint an integer (constructed from the prime factorization stored in pfmat) sample function calls makeintf (PF1) produces the value 144 makeintf (PF2) produces the value 30870 makeintf (PF3) produces the value 19827925 Repeat problem 1, but this time use a while loop instead of a for loop, and call the resulting function makeintW.m
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
