MATH 251
Name:
Examination II
April 4, 2011
Student Number:
FORM A
Section:
This exam has 12 questions for a total of 100 points. In order to obtain full credit for
partial credit problems, all work must be shown. For other problems, points might be
deduc
Chapter 7
Ordinary Differential
Equations
Matlab has several different functions for the numerical solution of ordinary differential equations. This chapter describes the simplest of these functions and then
compares all of the functions for efficiency, a
function rk4_systems(a, b, N, alpha)
0unction rk4_systems() approximates the solutions of systems of m
0ifferential equations that are written in the form
0y1/dt = f1(t,y1,y2,.,ym)
0y2/dt = f2(t,y1,y2,.,ym)
%.
%.
%.
0ym/dt = fm(t,y1,y2,.,ym)
%with t in th
Introduction to Matlab
Ela Pekalska,
Marjolein van der Glas
,
Pattern Recognition Group, Faculty of Applied Sciences
Delft University of Technology
2001 - 2004
Send comments to [email protected]
Contents
Introduction
Preliminaries . . . . . . . . . . .
Chapter 8
Fourier Analysis
We all use Fourier analysis every day without even knowing it. Cell phones, disc
drives, DVDs, and JPEGs all involve fast finite Fourier transforms. This chapter
discusses both the computation and the interpretation of FFTs.
The
function [xp, idid, lambda]=polyline(xc, fc, gc, d, ft, f, maxarm)
%
% C. T. Kelley, Dec 29, 1997
%
% This code comes with no guarantee or warranty of any kind.
%
% function [xp, idid]=polyline(xc, fc, gc, d, ft, fobj, maxarm)
%
% polynomial line search,
function [x,histout,costdata] = gaussn(x0,f,tol,maxit)
%
% C. T. Kelley, Dec 14, 1997
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = gaussn(x0,f)
%
% Damped Gauss-Newton with Armijo rule
% simple divide
function hess = diffhess(x, f, gc, heps)
% compute a forward difference Hessian f'(x)
%
% uses dirdero.m to compute the columns, then symmetrize
%
% C. T. Kelley, March 17, 1998
%
% This code comes with no guarantee or warranty of any kind.
%
%
% Inputs:
function [sgr,fb,xb,sflag]=simpgrad(x,f,v,fc,fdiff)
%
% simplex gradient for use with implicit filtering
% also tests for best point in stencil
%
% set fdiff = 1 to get forward differencing, useful in Nelder-Mead
%
simplex condition/gradient computaiton
%
function z = dirdero(x,w,f,gc,epsnew)
% Finite difference directional derivative for optimization
% Approximate f'(x) w
%
% C. T. Kelley, Dec 20, 1996
%
% This code comes with no guarantee or warranty of any kind.
%
% function z = dirdero(x,w,f,gc,epsnew)
Matlab tutorial
by Nick Aschenbach
In this tutorial you will learn a few of the basic functions of Matlab. First we will start
working with basic mathematical functions, setting variables, and generating time series.
This is followed by a short section on
function [x, histout] = hooke(x0, f, budget, scales, tol, v)
%
% Nelder-Mead optimizer, No tie-breaking rule other than MATLAB's sort
%
% C. T. Kelley, July 10, 1998
%
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x, histout
function [xSmall, t, tau] = rka(x,t,tau,err,derivsRK,param)
% Adaptive Runge-Kutta routine
% Inputs
% x Current value of the dependent variable
% t Independent variable (usually time)
% tau Step size (usually time step)
% err Desired fractional local trun
function [x,histout,costdata] = ntrust(x0,f,tol,maxit,resolution)
%
%
% C. T. Kelley, Dec 15, 1997
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = ntrust(x0,f,tol,maxit,resolution)
%
% Dogleg trust region
MATLAB
The Language of Technical Computing
Getting Started with MATLAB
Version 7
How to Contact The MathWorks:
www.mathworks.com
comp.soft-sys.matlab
www.mathworks.com/contact_TS.html
Web
Newsgroup
Technical support
[email protected]
Product enhancement
function [x,histout,costdata] = bfgswopt(x0,f,tol,maxit,hess0)
%
% C. T. Kelley, July 17, 1997
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout] = bfgswopt(x0,f,tol,maxit,hess0)
%
% steepest descent/bfgs with polynomi
function [x,histout,costdata] = projbfgs(x0,f,up,low,tol,maxit)
%
% C. T. Kelley, June 11, 1998
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = projbfgs(x0,f,up,low,tol,maxit)
%
% projected BFGS with Armi
function [x,lhist,histout] = imfil(x0,f,budget,scales,parms)
%
%
% C. T. Kelley, January 9, 1998
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,fcount,histout] = imfil(x0,f,budget,scales,parms)
%
% Unconstrained implicit fi
function [x,lhist,histout,simpdata]=nelder(x0,f,tol,maxit,budget)
%
% Nelder-Mead optimizer, No tie-breaking rule other than MATLAB's sort
%
% C. T. Kelley, December 12, 1996
%
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x
#
ME 681
MATHEMATICAL METHODS IN ENGINEERING
#
MATLAB Tutorial Session
Date : 03.08.2006
Day : Thursday
Venue: L2 Time: 17:00 - 18:00 Hrs.
=
1) PROGRAMMING IN MATLAB
=
- Done using command line or through scripting in a file.
- MATLAB scripts are
#
ME 681
MATHEMATICAL METHODS IN ENGINEERING
#
MATLAB Tutorial Session
Date : 02.08.2006
Day : Wednesday
Venue: L2 Time: 17:00 - 18:00 Hrs.
=
1) INTRODUCTION
=
Matlab (Matrix laboratory) is an interactive software system for numerical computati
function [x,histout,costdata] = steep(x0,f,tol,maxit)
%
% C. T. Kelley, Dec 20, 1996
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = steep(x0,f,tol,maxit)
%
% steepest descent with Armijo rule, polynomial
function R = rombf(a,b,N,func,param)
% Function to compute integrals by Romberg algorithm
% R = rombf(a,b,N,func,param)
% Inputs
% a,b Lower and upper bound of the integral
% N Romberg table is N by N
% func Name of integrand function in a string such as
function [x,histout,costdata] = levmar(x0,f,tol,maxit)
%
% C. T. Kelley, Dec 14, 1997
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = levmar(x0,f,tol,maxit)
%
% Levenberg-Marquardt code, trust region cont
Chapter 11
Partial Differential
Equations
A wide variety of partial differential equations occurs in technical computing. We
cannot begin to cover them all in this book. In this chapter, we limit ourselves to
three model problems for second-order partial
Chapter 10
Eigenvalues and Singular
Values
This chapter is about eigenvalues and singular values of matrices. Computational
algorithms and sensitivity to perturbations are both discussed.
10.1
Eigenvalue and Singular Value Decompositions
An eigenvalue and
function [x,histout,costdata] = gradproj(x0,f,up,low,tol,maxit)
%
% C. T. Kelley, June 11, 1998
%
% This code comes with no guarantee or warranty of any kind.
%
% function [x,histout,costdata] = gradproj(x0,f,up,low,tol,maxit)
%
% gradient projection with
MATH 251
Exam I
September 26, 2011
ANSWER KEY (Form A)
1.
(a) No
(b) Yes
(c) No (also acceptable: Yes, it can be rewritten
into an exact equation because the equation is separable.)
(d) No
2.
D
3.
A
4.
D
5.
A
6.
D
7.
B
8.
A
9.
B
10.
D
11.
y = ! 4et + 12
1
MATH 251
Name:
Final Examination
August 10, 2011
Student Number:
FORM A
Section:
This exam has 10 questions for a total of 150 points. In order to obtain full credit for
partial credit problems, all work must be shown. For other problems, points might be
MATH 251
Name:
Final Examination
April 30, 2012
Student Number:
FORM A
Section:
This exam has 15 questions for a total of 150 points. In order to obtain full credit for
partial credit problems, all work must be shown. For other problems, points might be
d