Question: help with Matlab he number 3234 can be written as 3234=237211. The Matlab command to find the prime actors of a number is factor(). See

help with Matlab help with Matlab he number 3234 can be written as 3234=237211. The

he number 3234 can be written as 3234=237211. The Matlab command to find the prime actors of a number is factor(). See https://en.wikipedia.org/wiki/Integer factorization for a description f integer factorization. le want to implement our own factoring function (without using the factor() command). Write a unction that returns the list of prime factors of an integer. - Use floor (x)=x to test if a number x is an integer. If x is an integer, then floor (x) is equal to x (remember: floor(x) is the integer part of the number x ). If the number has a decimal part, then floor (x) is not equal to x (example for x=3.1 : floor (3.1) is not equal to 3.1 (floor(3.1) is equal to 3 ) - Use isprime( n ) to test if a number n is a prime number - Remember: a number can have the same prime number factor multiple times in its decomposition (example above for 3234). Thus, you need to list each prime factor, and the number of times that these prime factors would be needed in the factorization 2) Least common multiple: Using a similar approach as the approach seen in class for computing the greatest common divisor of two integers, write a function that find the least common multiple of two integers a and b. You can test your function by comparing it to the built-in Icm() function of Matlab (do not name your function "Icm", as this function is already defined in Matlab)

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