Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

!!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!! !!! I UPVOTE FAIRLY !!! !!!

!!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!!

!!! I UPVOTE FAIRLY !!!

!!! PLEASE TEACH ME SO I CAN UNDERSTAND (PUT COMMENTS) !!!

image text in transcribed

21.2 Write a well-commented MATLAB function program myints whose inputs are f, a, b and n and whose outputs are L, R and T, the left, right and trapezoid integral approximations for fon (a, b) with n subintervals. To make it efficient, take advantage of the fact that Ar; is constant, use x - linspace(a,b,n+1) to make the r values, use y = f(x) to make the y values, use slice and sum to add the 2nd to nth y entries once, and then add on the missing terms to obtain the left, right and trapezoid approximations. Change to format long and apply your program to the integral i vode. Compare with the results of the previous exercise. Also find L100, R100 and T100 and the percentage errors of these approximations. Turn in the program and a brief summary of the results

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_2

Step: 3

blur-text-image_3

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

d. How will lack of trust be handled?

Answered: 1 week ago

Question

b. Does senior management trust the team?

Answered: 1 week ago