Question: using MatLab a ) Create a function named no _ repeats that takes one row vector of positive integers as an input and returns one

using MatLab a) Create a function named no_repeats that takes one row vector of positive integers as an
input and returns one row vector of positive integers as an output. The output should contain
every integer in the input array, in ascending order (this time use of the sort function is
allowed), with no repeat entries.
b) Create a function named powers1 that takes two positive integers as inputs and returns one
row vector of positive integers as an output. The output should contain all positive integer
powers of the first input that are less than or equal to the second input. For example, and input of
(3,1000) should return an output of [392781243729].
c) Create a function named powers2 that takes two positive integers as inputs, and returns one
row vector of positive integers as an output. Using powers1 and no_repeats, it should return all
positive integers less than or equal to the second input which are a positive integer power of a
positive integer that is less than or equal to the first input. For example, and input of (4,100)
should return all powers of 2,3 and 4 that are less than or equal to 100. The output vector should
contain no repeated entries, and should be in ascending order.
d) Run powers2 with inputs of (6,50) and do not suppress the output

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!