SlideShare a Scribd company logo
11/19/14 6:32 AM C:Usersphui3Trapezoidal.m 1 of 1
function Trapezoidal(t0,tf)
for i = 1:5
n = 2^(i-1);
middle = 0;
dt = (tf-t0)/n;
t = t0:dt:tf;
y(1) = 1;
if n >= 2
for j = (t0+dt):dt:(tf-dt)
middle = middle + 2*z(j);
end
end
trapezoid = (dt/2)*(z(t0) + middle + z(tf));
n
trapezoid
h(i) = dt;
e(i) = abs((1/101) - trapezoid);
end
plot(log(h), log(e));
xlabel('log h');
ylabel('log absolute error');
end
function z = z(t)
z = (1/(1+100*(t)));
end

More Related Content

What's hot

Complex Integral
Complex IntegralComplex Integral
Complex Integral
Mikołaj Hajduk
 
Effects of varying number of samples in an image
Effects of varying number of samples in an imageEffects of varying number of samples in an image
Effects of varying number of samples in an image
lakshmymk
 
متاپست (MetaPost)
متاپست (MetaPost)متاپست (MetaPost)
딥러닝 교육 자료 #2
딥러닝 교육 자료 #2딥러닝 교육 자료 #2
딥러닝 교육 자료 #2
Ashal aka JOKER
 
Notes 10-5
Notes 10-5Notes 10-5
Notes 10-5
Kate Nowak
 
Report in math
Report in mathReport in math
Report in math
Louise Ledesma
 
Program implementation and testing
Program implementation and testingProgram implementation and testing
Program implementation and testing
abukky52
 
3.1 Extreme Values of Functions
3.1 Extreme Values of Functions3.1 Extreme Values of Functions
3.1 Extreme Values of FunctionsSharon Henry
 
Lesson 4.1 Extreme Values
Lesson 4.1 Extreme ValuesLesson 4.1 Extreme Values
Lesson 4.1 Extreme ValuesSharon Henry
 
Edited Per4 Analytic Geometry
Edited Per4 Analytic GeometryEdited Per4 Analytic Geometry
Edited Per4 Analytic Geometry
ingroy
 
Bench Can Breakdance?
Bench Can Breakdance?Bench Can Breakdance?
Bench Can Breakdance?
benchoun
 
09 bsc-17 dsp lab 10-1
09 bsc-17 dsp lab 10-109 bsc-17 dsp lab 10-1
09 bsc-17 dsp lab 10-1
Jannat41
 
Figures
FiguresFigures
Figures
Drradz Maths
 
งาน 9 สุภาพร
งาน 9 สุภาพรงาน 9 สุภาพร
งาน 9 สุภาพรAreeya Onnom
 

What's hot (19)

Complex Integral
Complex IntegralComplex Integral
Complex Integral
 
Effects of varying number of samples in an image
Effects of varying number of samples in an imageEffects of varying number of samples in an image
Effects of varying number of samples in an image
 
متاپست (MetaPost)
متاپست (MetaPost)متاپست (MetaPost)
متاپست (MetaPost)
 
딥러닝 교육 자료 #2
딥러닝 교육 자료 #2딥러닝 교육 자료 #2
딥러닝 교육 자료 #2
 
Notes 10-5
Notes 10-5Notes 10-5
Notes 10-5
 
3.1 extrema on an interval
3.1 extrema on an interval3.1 extrema on an interval
3.1 extrema on an interval
 
Report in math
Report in mathReport in math
Report in math
 
Program implementation and testing
Program implementation and testingProgram implementation and testing
Program implementation and testing
 
3.1 Extreme Values of Functions
3.1 Extreme Values of Functions3.1 Extreme Values of Functions
3.1 Extreme Values of Functions
 
Lesson 4.1 Extreme Values
Lesson 4.1 Extreme ValuesLesson 4.1 Extreme Values
Lesson 4.1 Extreme Values
 
Edited Per4 Analytic Geometry
Edited Per4 Analytic GeometryEdited Per4 Analytic Geometry
Edited Per4 Analytic Geometry
 
Project2
Project2Project2
Project2
 
Day 1a examples
Day 1a examplesDay 1a examples
Day 1a examples
 
Bench Can Breakdance?
Bench Can Breakdance?Bench Can Breakdance?
Bench Can Breakdance?
 
09 bsc-17 dsp lab 10-1
09 bsc-17 dsp lab 10-109 bsc-17 dsp lab 10-1
09 bsc-17 dsp lab 10-1
 
Figures
FiguresFigures
Figures
 
งาน 9 สุภาพร
งาน 9 สุภาพรงาน 9 สุภาพร
งาน 9 สุภาพร
 
Integrals
IntegralsIntegrals
Integrals
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 

Viewers also liked

Portfolio dela rosa_2_
Portfolio dela rosa_2_Portfolio dela rosa_2_
Portfolio dela rosa_2_
Alejandro de la Rosa Lora
 
TSL referral letter Dec2014.PDF
TSL referral letter Dec2014.PDFTSL referral letter Dec2014.PDF
TSL referral letter Dec2014.PDFRona Goh
 
Proyecto Residencial 2015
Proyecto Residencial 2015Proyecto Residencial 2015
Proyecto Residencial 2015
Alejandro de la Rosa Lora
 
Small Library Management Day 1
Small Library Management Day 1Small Library Management Day 1
Small Library Management Day 1
guest857ecfd
 
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
Shih Hao Ho
 
день защиты детей
день защиты детейдень защиты детей
день защиты детей
virtualtaganrog
 
Contoh eksponen
Contoh eksponenContoh eksponen
Contoh eksponen
Swary Aristi
 
Ketogenic Diet
Ketogenic DietKetogenic Diet
Ketogenic Diet
Murad YAPICI
 
HROToday_RecruitingRequiresPeople_FINAL
HROToday_RecruitingRequiresPeople_FINALHROToday_RecruitingRequiresPeople_FINAL
HROToday_RecruitingRequiresPeople_FINALPaul Gordon
 
Literary translation in the 21th century
Literary translation in the 21th centuryLiterary translation in the 21th century
Literary translation in the 21th century
saronah1994
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled PresentationSueli Rocha
 

Viewers also liked (16)

Ribeira edificio plurifamiliar 12 viv.
Ribeira edificio plurifamiliar 12 viv.Ribeira edificio plurifamiliar 12 viv.
Ribeira edificio plurifamiliar 12 viv.
 
Gasolinera
GasolineraGasolinera
Gasolinera
 
Portfolio dela rosa_2_
Portfolio dela rosa_2_Portfolio dela rosa_2_
Portfolio dela rosa_2_
 
TSL referral letter Dec2014.PDF
TSL referral letter Dec2014.PDFTSL referral letter Dec2014.PDF
TSL referral letter Dec2014.PDF
 
Proyecto Residencial 2015
Proyecto Residencial 2015Proyecto Residencial 2015
Proyecto Residencial 2015
 
Small Library Management Day 1
Small Library Management Day 1Small Library Management Day 1
Small Library Management Day 1
 
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
Auricular acupuncture introduction - the anatomical landmarks of the ears part 1
 
Com 9
Com 9Com 9
Com 9
 
Portfolio 2013 del maestro
Portfolio 2013 del maestroPortfolio 2013 del maestro
Portfolio 2013 del maestro
 
Circular34 13b
Circular34 13bCircular34 13b
Circular34 13b
 
день защиты детей
день защиты детейдень защиты детей
день защиты детей
 
Contoh eksponen
Contoh eksponenContoh eksponen
Contoh eksponen
 
Ketogenic Diet
Ketogenic DietKetogenic Diet
Ketogenic Diet
 
HROToday_RecruitingRequiresPeople_FINAL
HROToday_RecruitingRequiresPeople_FINALHROToday_RecruitingRequiresPeople_FINAL
HROToday_RecruitingRequiresPeople_FINAL
 
Literary translation in the 21th century
Literary translation in the 21th centuryLiterary translation in the 21th century
Literary translation in the 21th century
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 

Recently uploaded

一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
bouvoy
 
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
ahmedendrise81
 
Regeneration of Diesel Particulate Filter in Automobile
Regeneration of Diesel Particulate Filter in AutomobileRegeneration of Diesel Particulate Filter in Automobile
Regeneration of Diesel Particulate Filter in Automobile
AtanuGhosh62
 
Hero Glamour Xtec Brochure | Hero MotoCorp
Hero Glamour Xtec Brochure | Hero MotoCorpHero Glamour Xtec Brochure | Hero MotoCorp
Hero Glamour Xtec Brochure | Hero MotoCorp
Hero MotoCorp
 
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
eygkup
 
What Could Cause The Headlights On Your Porsche 911 To Stop Working
What Could Cause The Headlights On Your Porsche 911 To Stop WorkingWhat Could Cause The Headlights On Your Porsche 911 To Stop Working
What Could Cause The Headlights On Your Porsche 911 To Stop Working
Lancer Service
 
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out HereWhy Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Masters European & Gapanese Auto Repair
 
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to TellWondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Vic Auto Collision & Repair
 
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
Fifth Gear Automotive Argyle
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
daothibichhang1
 
Why Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release CommandsWhy Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release Commands
Dart Auto
 
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
Import Motorworks
 
TRAINEES-RECORD-BOOK- electronics and electrical
TRAINEES-RECORD-BOOK- electronics and electricalTRAINEES-RECORD-BOOK- electronics and electrical
TRAINEES-RECORD-BOOK- electronics and electrical
JohnCarloPajarilloKa
 
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs  Consulting SMEs.pptxEmpowering Limpopo Entrepreneurs  Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Precious Mvulane CA (SA),RA
 
Antique Plastic Traders Company Profile
Antique Plastic Traders Company ProfileAntique Plastic Traders Company Profile
Antique Plastic Traders Company Profile
Antique Plastic Traders
 
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
Fifth Gear Automotive Cross Roads
 
Renal elimination.pdf fffffffffffffffffffff
Renal elimination.pdf fffffffffffffffffffffRenal elimination.pdf fffffffffffffffffffff
Renal elimination.pdf fffffffffffffffffffff
RehanRustam2
 
One compartment Model Deliverdddddded.pdf
One compartment Model Deliverdddddded.pdfOne compartment Model Deliverdddddded.pdf
One compartment Model Deliverdddddded.pdf
RehanRustam2
 
Things to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your carThings to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your car
jennifermiller8137
 
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
mymwpc
 

Recently uploaded (20)

一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
一比一原版(UNITEC毕业证)UNITEC理工学院毕业证成绩单如何办理
 
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
欧洲杯比赛投注官网-欧洲杯比赛投注官网网站-欧洲杯比赛投注官网|【​网址​🎉ac123.net🎉​】
 
Regeneration of Diesel Particulate Filter in Automobile
Regeneration of Diesel Particulate Filter in AutomobileRegeneration of Diesel Particulate Filter in Automobile
Regeneration of Diesel Particulate Filter in Automobile
 
Hero Glamour Xtec Brochure | Hero MotoCorp
Hero Glamour Xtec Brochure | Hero MotoCorpHero Glamour Xtec Brochure | Hero MotoCorp
Hero Glamour Xtec Brochure | Hero MotoCorp
 
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
一比一原版(AIS毕业证)奥克兰商学院毕业证成绩单如何办理
 
What Could Cause The Headlights On Your Porsche 911 To Stop Working
What Could Cause The Headlights On Your Porsche 911 To Stop WorkingWhat Could Cause The Headlights On Your Porsche 911 To Stop Working
What Could Cause The Headlights On Your Porsche 911 To Stop Working
 
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out HereWhy Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
Why Isn't Your BMW X5's Comfort Access Functioning Properly Find Out Here
 
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to TellWondering if Your Mercedes EIS is at Fault Here’s How to Tell
Wondering if Your Mercedes EIS is at Fault Here’s How to Tell
 
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
5 Warning Signs Your Mercedes Exhaust Back Pressure Sensor Is Failing
 
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.docBài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
Bài tập - Tiếng anh 11 Global Success UNIT 1 - Bản HS.doc
 
Why Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release CommandsWhy Is Your BMW X3 Hood Not Responding To Release Commands
Why Is Your BMW X3 Hood Not Responding To Release Commands
 
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
What Are The Immediate Steps To Take When The VW Temperature Light Starts Fla...
 
TRAINEES-RECORD-BOOK- electronics and electrical
TRAINEES-RECORD-BOOK- electronics and electricalTRAINEES-RECORD-BOOK- electronics and electrical
TRAINEES-RECORD-BOOK- electronics and electrical
 
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs  Consulting SMEs.pptxEmpowering Limpopo Entrepreneurs  Consulting SMEs.pptx
Empowering Limpopo Entrepreneurs Consulting SMEs.pptx
 
Antique Plastic Traders Company Profile
Antique Plastic Traders Company ProfileAntique Plastic Traders Company Profile
Antique Plastic Traders Company Profile
 
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
5 Red Flags Your VW Camshaft Position Sensor Might Be Failing
 
Renal elimination.pdf fffffffffffffffffffff
Renal elimination.pdf fffffffffffffffffffffRenal elimination.pdf fffffffffffffffffffff
Renal elimination.pdf fffffffffffffffffffff
 
One compartment Model Deliverdddddded.pdf
One compartment Model Deliverdddddded.pdfOne compartment Model Deliverdddddded.pdf
One compartment Model Deliverdddddded.pdf
 
Things to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your carThings to remember while upgrading the brakes of your car
Things to remember while upgrading the brakes of your car
 
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
一比一原版(AUT毕业证)奥克兰理工大学毕业证成绩单如何办理
 

Trapezoidal log log

  • 1. 11/19/14 6:32 AM C:Usersphui3Trapezoidal.m 1 of 1 function Trapezoidal(t0,tf) for i = 1:5 n = 2^(i-1); middle = 0; dt = (tf-t0)/n; t = t0:dt:tf; y(1) = 1; if n >= 2 for j = (t0+dt):dt:(tf-dt) middle = middle + 2*z(j); end end trapezoid = (dt/2)*(z(t0) + middle + z(tf)); n trapezoid h(i) = dt; e(i) = abs((1/101) - trapezoid); end plot(log(h), log(e)); xlabel('log h'); ylabel('log absolute error'); end function z = z(t) z = (1/(1+100*(t))); end