Question: 9. Write a function in Mathematica whose inputs are another function f and two values a and b. If a b, the output of the

9. Write a function in Mathematica whose inputs are another function f and two values a and b. If a b, the output of the function should be the vector {a, b, f[a], f[b]j, otherwise, the function should return the message: "Please ensure that a is less than b". Show that this function works properly for different cases. 10. Use the "For" built-in function to create a function whose input is a vector of numbers. The function should check for the first occurrence of a number whose absolute value is less than 0.0005. The function should output the row number and that particular value. For example, if the input is the vector v- 11,3,2,5,0.1,0.2,-0.0004, 0.03, 0.000005), then the output should be 7,-0.0004). If none of the absolute values of the components of the vector is less than 0.0005, the function should output:"NA. Repeat the problem using the "While" built-in function. ,32,5,01,00 thd shoud be 1,004, none of the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
