Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

=+C&B (especially taxation) laws, regulations, and practices?

Answered: 1 week ago

Question

=+designing international assignment C&B packages.

Answered: 1 week ago