Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MAE 215: Introduction to Programming in MATLAB Course Project Due: Monday, April 24 by midnight Submision Instructions: Your solutions to this assignment must be typed

image text in transcribed

image text in transcribed

MAE 215: Introduction to Programming in MATLAB Course Project Due: Monday, April 24 by midnight Submision Instructions: Your solutions to this assignment must be typed and neatly presented. Unorganized solutions and/or solutions that do not present the required deliverables will not be graded and receive a score of zero. This assignment is to be submitted, in PDF format, to the assignment link on blackboard by the deadline. Students who obtain a score of 80% or greater on this project wil receive credit for alcourse 1.l45 pts] Part 1- For" and "While' loops in MATLAB i. Consider the approximation for sin(x)given in homework 3 as: 3 xs x7 x9 x11 x13 15 x17 sin x 5! 9! 11 13! 15 17 Create a vector where each element is a term of the series mentioned above.Allow the user to input the value of x(as a scalar) Sum the terms of the same series using a for loop and create a formatted output to show the user (1) the value of the approximation (2) the actual value of sin(x) (from the MATLAB function) and 3) the error between the two. Usevaluesx 2.25.3 to compare. ii. Now consider the generalized form of the Taylor series for sin(x): 2N+1. (-1)" sinx (2n 1)! na0 Sum the first 100 terms of the series and show the result as a formatted output identical to that of 1C). Allow the user to input the value of x as a scalar. Repeat this problem with the first 250 terms Compare the results. (Use samexvalues as from (i) iii. How many terms are required in (iii) to reduce the relative error toless than 1%? 0.00001%? Assume that the relative error (percent) isdefined as: Error x 100 (2n+1) where Sand S are the true and numerical solutions respectively. The 'numerical solution will come from the summation of terms while the true solution can be obtained using the built-in MATLAB function for sin(x) Each iteration through the loop, create a formatted MAE 215: Introduction to Programming in MATLAB Course Project Due: Monday, April 24 by midnight Submision Instructions: Your solutions to this assignment must be typed and neatly presented. Unorganized solutions and/or solutions that do not present the required deliverables will not be graded and receive a score of zero. This assignment is to be submitted, in PDF format, to the assignment link on blackboard by the deadline. Students who obtain a score of 80% or greater on this project wil receive credit for alcourse 1.l45 pts] Part 1- For" and "While' loops in MATLAB i. Consider the approximation for sin(x)given in homework 3 as: 3 xs x7 x9 x11 x13 15 x17 sin x 5! 9! 11 13! 15 17 Create a vector where each element is a term of the series mentioned above.Allow the user to input the value of x(as a scalar) Sum the terms of the same series using a for loop and create a formatted output to show the user (1) the value of the approximation (2) the actual value of sin(x) (from the MATLAB function) and 3) the error between the two. Usevaluesx 2.25.3 to compare. ii. Now consider the generalized form of the Taylor series for sin(x): 2N+1. (-1)" sinx (2n 1)! na0 Sum the first 100 terms of the series and show the result as a formatted output identical to that of 1C). Allow the user to input the value of x as a scalar. Repeat this problem with the first 250 terms Compare the results. (Use samexvalues as from (i) iii. How many terms are required in (iii) to reduce the relative error toless than 1%? 0.00001%? Assume that the relative error (percent) isdefined as: Error x 100 (2n+1) where Sand S are the true and numerical solutions respectively. The 'numerical solution will come from the summation of terms while the true solution can be obtained using the built-in MATLAB function for sin(x) Each iteration through the loop, create a formatted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

Define an analog and a digital signal.

Answered: 1 week ago