Can someone help me out please even my profosser don't help me so im asking anyone to help me out on matlab. i don't even know where to start and how to form the formula.

The first MATLAB function that you will need to create is:

function [count] = RootCount(y)This function should determine the number of roots in the equation represented by the input argument vector

yand return this value via the output argumentcount.

The easiest way to accomplish this task is to examine each adjacent pair ofyvalues (y(1)andy(2),y(2)andy(3), etc.) and count how many times there is a sign change between the two values. This change of sign indicates that there is a root (zero point), as the equation has crossed the x axis. Hint: If the product of the two adjacent values is negative, then there is a root (zero point), as the equation has crossed the x axis.

Create a MATLAB script file to test your function and find the number of roots in the following equations, over the specified intervals:

y(t) = -0.1t4 + 0.8t3 + 10t - 70in the interval0 ≤ t ≤ 8in the interval

y(x) = exsin(x) – 50 ≤ x ≤ 20In both cases the increment for either

torxshould be quite small, probably of the order0.01.

If your function is working correctly, you should get values of1and7, respectively.

Next we want to create second MATLAB function:Finding Roots

function [count, values] = RootValues(x, y)This function, in addition to find the number of roots in the equation, will also return a vector containing the root values.

To accomplish this task, when you find a root value, take the average of the correspondingxvalues to find the approximate value of the root. NOTE: Thexvector which is sent to the function as an input argument should contain the values used to evaluate the equation and generate theyvector.

Once again create a MATLAB scrip file to test this function and once again use the following equations over the specified intervals:

y(t) = -0.1t4 + 0.8t3 + 10t - 70in the interval0 ≤ t ≤ 8in the interval

y(x) = exsin(x) – 50 ≤ x ≤ 20

RootCount Revisited

Lets revisit ourRootCountfunction, only this time lets use it to determine the number of roots in a selection ofsinefunctions in the interval0 ≤ x ≤ 2*pi.

Create a MATLAB script file to fine the number of roots for the followingsinefunctions:

sin(x) sin(2*x) sin(3*x) sin(10*x)Did you get the values

1, 3, 5, and 19, respectively? You should have!

In the interval0 ≤ x ≤ 2*pi, we know thatsin(x)makes one oscillation,sin(2*x)makes 2 oscillations,sin(3*x)makes 3 oscillations, andsin(10*x)makes 10 oscillations. Can we find a relationship between the number of oscillations (frequency) and the number of roots? Kind of looks like (number of roots + 1) / 2does it?