Question: In matlab: 2. a) Create an anonymous function named quartic that acts as the polynomial quartic(x)=x4+x37x2x+6 This equation has four roots, which are all integers

In matlab:
In matlab: 2. a) Create an anonymous function named "quartic" that acts

2. a) Create an anonymous function named "quartic" that acts as the polynomial quartic(x)=x4+x37x2x+6 This equation has four roots, which are all integers between 5 and 5 . b) Create a 14 array of zeros names "roots." Write a for loop that tests each integer from 5 to 5 and stores the four values for which quartic returns 0 in the "roots" array. Display roots in the command window. (Hint: you may want to initialize a variable outside of your loop to count how many roots have been found) 3. Generate a random integer ' n ' between 3 and 6 . Create an nn array named "numbers" consisting of random integers between 1 and 50 , and let the array show in the command window (do not suppress this output). Using a while loop, for loop(s), and if statement(s), write code that rearranges the integers in the array so that when read from left-to-right then top-to-bottom all of the even numbers come before all of the odd numbers (with the even numbers in the same order as they started, and the odd numbers in the same order as they started). Output the final sorted array to the command window

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!