Write a matlab program segment

Assignment Help MATLAB Programming
Reference no: EM13189528

In numerical integration and in many other cases, we need a polynomial named Legendre polynomial. Often the zeros i.e. the roots of the polynomial are also needed. The sixth order Legendre polynomial is given by the following equation:

P6(x) = 693x6 - 945x4 + 315x2 - 15

There are six roots of the P6(x) = 0 equation. Note that all the zeros of Legendre polynomial have magnitude less than one i.e. the roots are between -1 and 1. Also, note that for a polynomial of even order, the zeros are symmetrical about the origin. Therefore, for each root x, -x is also a root. If you find the three roots between 0 and 1, the other roots are negative of them.

Now write a MATLAB program that does the following:

a) Plot the given function in MATLAB for x ranging from -1 to 1. Put a proper title of the plot, also label the axes appropriately.

b) Use MATLAB's roots function to obtain the six roots of the equation. Display the roots and plot them with different colors and symbols on the same chart where you plotted the function.

c) Write a MATLAB program segment that will implement the root finding algorithm by Newton-Raphson method. Newton-Raphson method needs one initial value to run each time. You program segment will be executed with different initial values that you get from
d).

d) Use a loop in your program to execute the Newton-Raphson program segment for each initial value between -1 to 1 with an interval 0.1. Plot the initial values on the x-axis with the color that you used in b) to plot the root obtained from this initial value; these plots will be on the same chart. For example, if you start from 0.1 and obtain the first root that you plotted by using color red in b), then plot (0.1, 0) with color red.

e) In the plot, you will see one root is obtained from an initial value that is close to another root. Can you explain by observing the plot why that is happening.

Reference no: EM13189528

Questions Cloud

Compute the current break-even sales (units). : Currently, the unit selling price of a product is $110, the unit variable cost is $80, and the total fixed costs are $345,000. A proposal is being evaluated to increase the unit selling price to $120.
Text-values and attitudes expressed in ming fiction : According to the text, values and attitudes expressed in Ming fiction and plays began to have an impact on the culture of the literati. How?
Find the volume v of water in the bowl : A bowl is shaped like a hemisphere with diameter 36 cm. A ball with diameter 4 cm is placed in the bowl and water is poured into the bowl to a depth of h centimeters. Find the volume V of water in the bowl. Consider two cases: one in which the bal..
How many acre-feet of water are evapotranspirated : The average amount of evapotranspiration at Beowawe (water vapor being transferred to the atmosphere by evaporation and plant activity) is 51.17 inches per year. How many acre-feet of water are evapotranspirated at Beowawe on the average every yea..
Write a matlab program segment : Plot the given function in MATLAB for x ranging from -1 to 1. Put a proper title of the plot, also label the axes appropriately.
Determine what is the gradient amount : A project generates decreasing cash flows, $10,000 one year from now, decreases $1,000 every year and the project at the end of year 6 (6 years from now). At an annual interest rate of 12%.what type of Gradient is this
How much worth per second : The highest average cost of 30-second commercial in October,2002 was $455,700. How much worth per second?
How much alpha energy was absorbed : The efficiency of a scintillation detector is 5.1%. It absorbs alpha radiaion, producing 41,100 photons of average wavelength 4800 angstroms. How much alpha energy was absorbed?
Find first four terms in each of two linearly independent : Find the first four terms in each of two linearly independent solutions of the given differential equation (solve by means of a power series about the given point x0 ).

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Filtering – biomedical application

Prepare a filter that removes noise produced by electronic medical equipment.

  Write a function in matlab

write a function in MATLAB

  Characterizing population of about countries

Select 10 features characterizing the population of about 100 countries. load it into Matlab. Normalize the data between 0 and 1. (min, max and minmax are some useful Matlab commands)

  Calculate an approximation to the energy consumed

Calculate an approximation to the energy consumed over the period and calculate an approximation to the energy consumed over the period t = a to t = b.

  Linear support vector machine svm

Write a computer program to prepare a Linear Support Vector Machine SVM.

  Matlab program which will determine your vehicle fuel usage

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this progr..

  Secant method to tryt to find out the root

create a function that will use the secant method to tryt to find out the root

  Deterministic dimensions and rebar area

Performance function for bending of a rectangular reinforced concrete beam under moments due to dead and live loads

  Realistic animations include more

Realistic animations include more than just translations of shapes. They also have scaling involved. For this question, you're asked to write a function called "problem4" that accepts a single input variable and applies a scaling constant of 3. Th..

  Pattern recognition

Research and discover more in-depth knowledge about topics in Pattern Recognition and choose a topic. The best topic will be the one you are most interested in or a topic from your research project you are working on.

  Coding(using for and while loop)

coding(using for and while loop)

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd