MMME1037 Programming, Professional and Laboratory Skills

Assignment Help Other Subject
Reference no: EM132411709

MMME1037 Programming, Professional and Laboratory Skills Assignment - University of Nottingham, UK

An exercise in coding algorithms - Polynomials.

Background: The following is an example of a polynomial:

12x5 + 2x4 - 7x3 + 13x2 + 6

We can represent that polynomial by storing its coefficients in a row-vector - starting with the coefficient of the highest power of x and working down. The following row-vector, (called P here) would represent the polynomial above:

>> P = [12 2 -7 13 0 6]

Note that a "zero" has to be inserted to indicate that the coefficient of x1 is zero. Note also that we will deal only with polynomials whose coefficients are real. (Complex coefficients sometimes arise but are not relevant here). The order of the polynomial is the highest power of x. The above polynomial is "5th order" but notice that there are 6 coefficients - since there must be a coefficient of x0.

This coursework concerns developing a set of tools for working with polynomials.

These tools are useful for a number of engineering applications - and they are especially useful for understanding control theory but the applications themselves are outside of the scope of this assignment.

In this coursework assignment, polynomials are denoted P(x), Q(x), R(x) etc. in mathematical notation.

If any function intended to return a polynomial result encounters some critical error, then it should return a null array (i.e. an array with zero columns and zero rows).

Overall Requirement - The following 9 tasks are set

(1) Develop two functions - called poly_input and poly_output respectively. These interact with the user to take-in or display polynomials respective.

(2) Develop a function called poly_row which takes in an array, checks that this array is either a row or a column and then outputs a row vector.

(3) Develop a function called poly_eval which evaluates the polynomial at a set of values of x provided. (This must work correctly with complex values of x).

(4) Develop a function called poly_sum which determines the sum of two polynomials R(x) = P(x) + Q(x) where P(x) and Q(x) may have different orders.

(5) Develop a function called poly_prod which determines the product of two polynomials R(x) = P(x) × Q(x) where P(x) and Q(x) may have different orders.

(6) Create a function called poly_fact which decomposes P(x) as P(x) = S(x) × Q(x) + R(x). Here, the polynomials P(x) and S(x) are given and the polynomials Q(x) and R(x) are to be determined.

(7) Create a function called poly_intg for integrating polynomials.

(8) Create a function called poly_diff for differentiating polynomials.

(9) Create a single script called task 9 which exercises all of the above following the instructions given in the expanded task definition below.

Expanded Task Definitions -

Task 1 - In your write-up of task 1, only the MATLAB code for the two functions is required.

Task 2 - Develop a function called poly_row which takes in an array, checks that this array is either a row or a column and then outputs a row vector.

Task 3 - Develop a function called poly_eval which evaluates the polynomial at a set of values of x.

Task 4 - Develop a function called poly_sum which determines the sum of two polynomials

Task 5 - Develop a function called poly_prod which determines the product of two polynomials

Task 6 - Create a function called poly_fact which decomposes P(x) as P(x) = S(x) × Q(x) + R(x).

In the use of this function, the two polynomials P(x) and Q(x) are given and the requirement is to determine S(x) and R(x). Obviously:

The order of P(x) must be at least as high as the order of Q(x). Usually it is higher. Note that the order of S(x) is the difference between the other two orders so that if P(x) and Q(x) have the same order, then S(x) is simply a scalar.

The order of R(x) must be lower than the order of Q(x).

Task 7 - Create a function called poly_intg which integrates P(x) with respect to x - setting the constant term of the result equal to 0. This function should have only one input argument and should generate only one output argument. Recall that the integral of axn with respect to x is (a/(n+1)) xn+1 and note that the integration being discussed here is analytical integration (not numerical integration).

Task 8 - Create a function called poly_diff which differentiates P(x) with respect to x. This function should have only one input argument and should generate only one output argument. Recall that the differentiation of axn with respect to x is (an) xn-1 and note that the differentiation being discussed here is analytical differentiation (not numerical differentiation).

Task 9 - Create a single script called task_9 which exercises all of the above as instructed here:

Establish the row vector representing the polynomial P(x) = 14x6 + 18x5 - 5x4 + 28x3 - 12x3 + 11x - 95 and call poly_output to display it.

Get the user to input a polynomial, Q(x), of order 4 using poly_input and call poly_eval to compute its values for a range of values of x from -3 to +3 in 2000 steps. Plot the resulting curve. Your report should include the curve produced and the 4 polynomial coefficients actually input to form that curve.

Find the sum of P(x) and Q(x), denoted U(x) here, and use poly_output to display it.

Find the product of P(x) and Q(x), denoted V(x) here, and use poly_output to display that.

Get the user to input a new polynomial, W(x), of order 4 using poly_input and apply poly_fact to decompose V(x) as V(x) = W(x) S(x) + R(x). Your report should include the coefficients used for W(x).

Differentiate V(x) three times and report the result.

In the above, the coefficients input by the user to describe Q(x) and W(x) should be integers.

Attachment:- Programming, Professional and Laboratory Skills Assignment File.rar

Reference no: EM132411709

Questions Cloud

Describe it security policy for handling user accounts : Create a step-by-step IT security policy for handling user accounts/rights for a student who is leaving prematurely (drops, is expelled, and so on).
Explaining the safe harbor provisions under hipaa : Write an essay of at least 500 words discussing the Safe Harbor provisions under HIPAA. Use the five paragraph format. Each paragraph must have at least five.
Describe the types of denial of service attacks : Research two types of viruses, two types of malware, and two types of denial of service attacks using the internet or any other type of resource available.
Discuss why your alternatives provide a better design : Use the Internet to research design flaws in cellular networks that affect performance or security and find alternative designs that can improve capabilities.
MMME1037 Programming, Professional and Laboratory Skills : MMME1037 Programming, Professional and Laboratory Skills Assignment Help and Solution - University of Nottingham, UK. Exercise in coding algorithms Polynomials
How cloud technology marketplace look like in the next years : Compare between Amazon AWS cloud, Microsoft Azure, and Open Stack cloud technologies . Discuss how the cloud technology marketplace looks like in the next ten.
Discuss weaknesses in the systems and how to improve them : Information Assurance (IA) is the practice of safeguarding information and managing risks related to the use, processing, storage, and transmission.
C11LS Strategies for Managing Supply Chains Assignment : C11LS Strategies for Managing Supply Chains Assignment Help and Solution, Heriot-Watt University - Assessment Writing Service
Compare audit trail requirements or recommendations : Compare and contrast audit trail requirements or recommendations in various regulatory compliance frameworks (e.g., HIPAA, PCI, SOX, etc.). 450 words.

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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