Question

Solve by using (a) the most accurate combination of Trapezoidal and Simpson’s rules. (b) the MATLAB...

Solve by using
(a) the most accurate combination of Trapezoidal and Simpson’s rules.

(b) the MATLAB trapz function.

(c) the function trapuneq.

media%2Fa83%2Fa839d59f-fad3-4d86-8072-45
0 0
Add a comment Improve this question Transcribed image text
Answer #1

PLEASE REFER BELOW CODE

close all
clear all
clc


%a)
%given data
x = [0 2 4 5 6 7 10];
r = [2 1.35 1.34 1.6 1.58 1.42 2];

%trapezoidal rule
a = 0;
b = 10;
h = (b-a)/length(x);

l=length(x);
I = (h/3)*((r(1)+r(l))+2*(r(3)+r(5))+4*(r(2)+r(4)+r(6)))

%b)
I1 = trapz(x,r)

%c)
I2 = trapuneq(x,r)

PLEASE REFER BELOW OUTPUT


I =

13.0095


I1 =

15.7300


I2 =

15.7300

>>

Add a comment
Know the answer?
Add Answer to:
Solve by using (a) the most accurate combination of Trapezoidal and Simpson’s rules. (b) the MATLAB...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT