18 views

Original Title: A06

Uploaded by Jonathon Fisher

A06

Attribution Non-Commercial (BY-NC)

- kix2010
- Perl 01 - Basics
- GFS-426B PACSystems Programming
- Tutorial - Learn Python in 10 Minutes
- Basics of Euler Method
- Introduction to Matlab
- MatLab API to C++
- 08 Java Chapter7
- CL 400 Concepts
- People Code Events
- AS400 QUESTIONS(SOME)
- vhdl
- Such Software as Web Browser Program, Media Player Program, Client Messanger Can Be Operated to Install Fake Alert Trojan.
- My Collection of PHP Performance Benchmarks
- JS Float32Array
- JS Float64Array
- introduction to c programming(1st sem-2015).html.pdf
- W7_Array
- samplesolutions
- ring programming language book - part 5 of 84

You are on page 1of 3

357

Assignment 6: Numerical Integration + ODE

Fall 2012

Assigned: Due Date: Due Time: October 16 October 24 12 PM CST (hard copy) 5 PM CST Submission: Electronic/Hardcopy Collaboration Type: Individual Grading: 30 pts

Assignment Purpose: The purpose of this assignment is to help you build your understanding of methods for numerical differentiation and integration. Assignment Instructions: Complete the tasks given below. The standard policy on collaboration is in effect. Submission Instructions: Although some coding is involved, all submissions are to be done in hard-copy format. As always, your submission should include any deliverables for the tasks and your collaboration statement (if applicable). Hard copy has to be submitted in class at 12 PM CST. Submissions note: Please submit your explanations/answers to questions as a hard copy of a typed documentno hand-written responses please. Electronic submission (for programming assignments) should be done within a folder with the following name: A06_MEEN357_501_FamilyName_FirstName.zip. Grading Policy: This assignment is worth 30 points. Task 1: Write a code a06_romberg_int.m (4 pts) Write a program to implement Romberg integration. Note that you need to provide the program with a function name fun, which is actually the name of a matlab file that evaluates f(x) function I = a06_romberg_int(func,a,b,es,maxit) % I = a06_romberg_int(func,a,b,es): % Romberg integration. % input: % func = name of function to be integrated % a, b = integration limits % es = (optional) stop criterion (%); default = 0.00001 % maxit = (optional) max allow iterations; default = 30 % output: % I = integral estimate Specifications: Function should check if b is larger than a Deliverables: Matlab file a06_romberg_int.m Program Listing (Hard Copy)

10/16/12

MEEN 357

Fall 2012

Task 2: Euler Method (5 pts) Write a program to implement Eulers Method. [t,y] = a06_ode_Euler(diffeq,tspan, y0, ssize) % diffeq = (string) name of the m-file that evaluates the right hand side of the ODE written in standard form % tspan = Time span [t0,tf] % y0 = initial condition for the dependent variable % ssize = stepsize for advancing the independent variable % Output: % t = vector of independent variable values: t(j)=(j-1)*h % y = vector of numerical solution values at the t(j) THIS CODE SHOULD BE ABLE TO HANDLE SYSTEMS OF ODEs AS WELL Specifications: Function should check that tspan is a 1-D array Function should check that ssize is a scalar Function should check that y0 is a scalar OR a 1-D array Deliverables: Matlab file a06_ode_Euler.m Program Listing (Hard Copy) Task 3: Runge-Kutta, fourth order (5 pts) Write a program to implement Runge-Kuta 4th Order Method. [t,y] = a06_ode_RK4(diffeq,tspan,y0,ssize) % diffeq = (string) name of the m-file that evaluates the right hand side of the ODE written in standard form % tspan = Time span [t0,tf] % y0 = initial condition for the dependent variable % ssize = stepsize for advancing the independent variable % Output: % t = vector of independent variable values: t(j)=(j-1)*h % y = vector of numerical solution values at the t(j) THIS CODE SHOULD BE ABLE TO HANDLE SYSTEMS OF ODEs AS WELL Specifications: Function should check that tspan is a 1-D array Function should check that ssize is a scalar Function should check that y0 is a scalar OR a 1-D array Deliverables: Matlab file a06_ode_RK4.m Program Listing (Hard Copy)

10/16/12

MEEN 357

Fall 2012

Task 4: Solution to Text Problem (5 pts) Create a script named a06_25_4.m that solves the differential equation in problem 25.4. You should also provide with the function a06_function_25_4.m that implements the differential equation. Your code should call your a06_ode_RK4 code. No MATLAB ODE solver allowed. The script should output a properly formatted figure of the behavior of y(1) and y(2) vs t. Deliverables: Matlab file a06_25_4.m and a06_function_25_4.m Program Listing (Hard Copy) Task 5: Solution to Text Problem (5 pts) Create a script named a06_25_20.m that solves the differential equation in problem 25.20. You should also provide with the function a06_function_25_20.m that implements the differential equation(s). You may use any MATLAB ODE solver you want. The script should display a properly formatted solution (i. e. The time to empty the tank is xx seconds.) The script should also plot the height of water in the tank as a function of time. Use proper labels and legends. Deliverables: Matlab file a06_25_20.m and a06_function_25_20.m Program Listing (Hard Copy) Task 5: Hard Copy Problems (6 points) Problem 25.1 Problem 25.4 Problem 25.7

10/16/12

- kix2010Uploaded bybestasw
- Perl 01 - BasicsUploaded bymghuzurahmed
- GFS-426B PACSystems ProgrammingUploaded byElafan
- Tutorial - Learn Python in 10 MinutesUploaded byprv
- Basics of Euler MethodUploaded bymuhammad_sarwar_27
- Introduction to MatlabUploaded byMahmoud Basho
- MatLab API to C++Uploaded byluis262010
- 08 Java Chapter7Uploaded byCedric Cedric
- CL 400 ConceptsUploaded byAbhinav Singhal
- People Code EventsUploaded byShaiukh Noor
- AS400 QUESTIONS(SOME)Uploaded bySrinivasareddy Lavunuri
- vhdlUploaded byNoor Jas
- Such Software as Web Browser Program, Media Player Program, Client Messanger Can Be Operated to Install Fake Alert Trojan.Uploaded bypolepoleta
- My Collection of PHP Performance BenchmarksUploaded byPoorna Kalandhar
- JS Float32ArrayUploaded bynipu90
- JS Float64ArrayUploaded bynipu90
- introduction to c programming(1st sem-2015).html.pdfUploaded bySiddharth Chetry
- W7_ArrayUploaded bynovi gultom
- samplesolutionsUploaded byapi-309178395
- ring programming language book - part 5 of 84Uploaded byMahmoud Samir Fayed
- sci_DBUploaded bysmjain
- lab4Uploaded bySulman Shahzad
- Scripting Languages Lecture4Uploaded byThi Nguyen
- ASCII ProgrammersGuideUploaded byndipebot
- CSC34 (Object Oriented Programming II)Uploaded byMELJUN CORTES, MBA,MPA
- ManUploaded byEmmanuel AeroEng Zingapeta
- Plan Horst MannUploaded byEdo Krajinic
- 06 Working from Command Line.pdfUploaded byponpisut
- ScjpUploaded bySrikanth Madasu
- intro_to_c__Uploaded byCheney Tsai

- MWTMAN21_001.pdfUploaded byedmuarizt7078
- AnaPalmero ResumeUploaded byAna Paula
- LogFire-Integration-2017-05-22 (1)Uploaded byAnonymous oSTh85
- MD050 JOURNAL IMPORT INTERFACE.docUploaded byTarunKandpal
- Data MiningUploaded byRajesh Patel
- Ch.9b String ManipulationUploaded bywfscmgbh
- C8051F12x-DK[1]Uploaded byPATEL SWAPNEEL
- 11-BayesianMethods.pdfUploaded byMatheus Silva
- 7 Steps to Mastering Machine Learning With PythonUploaded byypravi
- 87894086 2G Ericsson Recommended Parameters G10Uploaded byYazeed Kheetan
- Customization in Oracle ApplicationsUploaded bychanchal chachan
- Managing O365 Identities and Services -20346TK-MOC-UpdateUploaded byatrevido43
- Core Java Book.docxUploaded byraghu84taduri
- 6k_high_cpuUploaded byshareefgs5560
- forecasting Chaotic Time SeriesUploaded byDon Sido
- Multimedia Technology Ch1 1Uploaded bySyed Fateh Ali Shah
- Base Measurements-microcontroller CourseUploaded byAna Bimbiloska Kokolanska
- chap3Uploaded byJary Lin
- Paint Mate 200iA Series_27Uploaded bycountzeroasl
- KVM Libvirt Assign Static Guest IP Addresses Using DHCP on the Virtual MachineUploaded byAsep Septiadi
- MOD-024-1 Verification of Generator Gross and Net Real Power CapabilityUploaded byBibin Nurhadi
- Operation Guide for PTN NE Management-(V200R007C03_01)Uploaded byVitaliyBravo
- MQLMySQL Technical Reference MQL4Uploaded byLee You Lin
- Leap Work.pptxUploaded byKamalBehl
- Communication Rfid PDFUploaded byJeff
- GHost++ Gameinfo UpdatesUploaded byKevinGameronly
- Manual UsUploaded byノエルモレノ
- 119007-config-asa9x-ike-ipsec-00.pdfUploaded byJC Castillo
- IT Infrastructure StrategyUploaded byAugustine Barlow
- Free magazinUploaded bySebastian Andrei