Question: In Matlab!! Write a function named myFun whose inputs are a function f and a positive integer n. The function will return the value of


In Matlab!!
Write a function named myFun whose inputs are a function f and a positive integer n. The function will return the value of =1n[f()]2. (You may assume the function f can operate on matrices.) The following is an example of how your function would be used in the command window: >>=@(x)5x; >> my Fun (f,3) ans = 350 Write a function named bythree whose input is a positive number x. It will return the number of times x must be multiplied by 3 until the value becomes 1000 or greater. If the input x is a negative number or 0 , the function should return 0 . Use a loop to count the number of times the value is multiplied by 3 . The following is an example of how your function would be used in the command window: >> bythree(5.5) ans = 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
