Question: Please provide all steps 4. loop a. Use a for loop to add all the elements of a vector using a function M-file. Create a

Please provide all steps
 Please provide all steps 4. loop a. Use a for loop

4. loop a. Use a for loop to add all the elements of a vector using a function M-file. Create a random array of x amount of entries to test. Create a function M-file that takes a vector input and generates an output that is the product of all elements. Use a loop structure and don't use built-in functions. b. Create a row vector of 10 random integers between 0 and 100, and use a for loop to find the largest and smallest element without using the built-in functions min and max. c. Write a script file. Using a loop, divide 1 by 3, then again divide the result by 3, and so on until the result is less than 1 x 10-5. Display what the final number is and how many divisions were done. d. Create a column vector of 8 random numbers between 0 and 2, and use a for to count how many numbers are between 00.5 and 1.5 (inclusive range). e. Write a script file that asks for a temperature in degree Fahrenheit and computes the equivalent temperatures in degrees Celsius. The script should keep running until no number is provided to convert (i.e. striking just Enter key at input prompt). Hint: the function "isempty" will be useful here f

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!