Commands clc clear command window clear delete all variables clear var1 var2 var3 . delete selected variables grid on adds a grid to the current graph grid off removes grid from current graph help command provide help on command (e.g. help clear) help fun
Lab Test #2 Marking Scheme Note: From the point of view of the marking and submission systems, this test is out of 20 rather than 10. This has been done to make it possible to award half marks. Mark according to this scheme and then multiply the result by
Root Finding:
xR xU EMAX
f ( xU )( xU xL ) f ( xU ) f ( xL ) N log 2
xi 1 xi
f ( xi )( xi 1 xi ) f ( xi 1 ) f ( xi )
xi 1 xi
f ( xi ) f ( xi )
x 0 2N
log(x 0 / EMAX ) x 0 log 2 EMAX
Golden Section:
X 2 XU d , X 1 X L d , d ( 1)( X U X L ) EMAX x 0 ( 1)
4/7/2010
Course Summary Matlab A general ability to effectively use Matlab as a tool Array manipulation (creation, selection of elements.) Loops and If's Plotting Functions (anonymous, mfile, subfunctions) Dot operators Linspace, colon operator Etc.
Root
List of Approved Calculators
TI: TI-30X (various sub models) TI-34 II CASIO: fx 82 MS fx 100 MS fx 260 fx 300 MS (bookstore model, not impressive) fx 570 fx 991 MS (model assumed in notes) fx 991 ES SHARP: EL-510R EL-520 EL-520W EL-531W STAPLES: BD-6108
ECOR 2606 Lab Test #2 v6 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #2 v5 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #2 v4 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #2 v3 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #2 v2 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #2 v1 Instructions: Submit two "script" files, one for each of the two questions. Call these files Q1.m and Q2.m. All values output by your scripts must be appropriately identified (e.g. "The value of . is ."). Just omitting the semi-co
ECOR 2606 Lab Test #1 v6 A belt runs around two pulleys as shown . The length L of the belt can be calculated using the equations given.
C
radius R2 radius R1
R1 R2 A sin1 C L 2C cos A R1( 2 A) R2( 2 A)
where A = an angle (in radians) R1 = radius of larg
ECOR 2606 Lab Test #1 v5 (This problem adapted from problem 6.18 in the text) The impedance of a circuit containing a capacitor, an inductor, and a resister can be calculated using:
1 1 Z 1/ C 2 L R
2
where R = resistance () C = capacitance (F) L = induc
ECOR 2606 Lab Test #1 v4 (This problem adapted from problem 6.15 in the text) A horizontal cylinder contains some liquid. The volume of the liquid can be calculated using: rh V r 2 cos 1 (r h) 2rh h 2 L r where r = radius of cylinder (m) L = length of cyl
ECOR 2606 Lab Test #1 v3 (This problem adapted from problem 5.20 in the text) The upward velocity v of a rocket is is given by:
m0 v u ln m qt gt 0
where v = upward velocity of rocket (m/s) u = relative velocity at which fuel is expelled (m/s) q = fuel
ECOR 2606 Lab Test #1 v2 (This problem adapted from problem 5.17 in the text) An electrical charge Q is uniformly distributed around a ring shaped conductor with radius a. A charge q is located at a distance x from the centre of the ring. The force F exer
ECOR 2606 Lab Test #1 v1 The diagram illustrates a gas flowing through a nozzle. As the cross sectional area of the nozzle gets smaller and smaller, the gas flows faster and faster until, at the choke point, it is flowing at Mach 1 (M = 1). If the Mach nu
ECOR 2606 - Lab 10 Question 1: File SCO2 .txt contains tabulated NIST (National Institute of Standards and Technology) data for supercritical carbon dioxide. Column one is the temperature (in K), column two is the pressure (in bar), column three is enthal
ECOR 2606 Laboratory 9 Note: The first two questions are a bit of a throwback to past material but fill in a gap in what you've been asked to do in the assignments and in the lab. 1/. Use Gaussian eliminating (with pivoting) to solve the following series
ECOR 2606 - Lab #6 Part 1: Examine and execute the supplied script file (part0.m). The first part of this script is shown below:
maxN = 5; fullA = rand(maxN, maxN) fullB = rand(maxN ,1) A = fullA (1 : 2, 1: 2) b = fullB (1 : 2) tic; x = A\b; t = toc; fpri
ECOR 2606 - Lab #5 Part 1: Analysis of an engineering problem has produced the following equations:
2a 14b 5c 52 5a 6b 2c 2 a 5b 3c 17
What are a, b, and c? Obtain the solution twice, once using the inverse of A and once using left division. Place all of
ECOR 2606 Lab 2
Two discs overlap each other as shown is the diagram below:
If R1, R2, and D are known X can be calculated using:
X ( D 2 R12 R 2 2 ) / 2 D
The area of a segment of a circle can be calculated using the following formula:
A
R 2
x x R 2 x 2
ECOR 2606 Lab 1 Part 1 An experiment involves the growth of e-coli in a perti dish. It has been determined that the growth rate of the bacteria is governed by the following equation:
B (t ) where
250 1 56.75e 0.17 t
B(t) is the number of bacteria (in '000
7: Linear Algebraic Equations and Matrices
Chapter Objectives
Linear algebraic equations matrices matrix algebra.
linear systems of equations what and where in engineering matrix notation identify types of matrices (identity, diagonal, symmetric, triangul
6: Roots of Equations: Open Methods
Chapter Objectives
Recognize difference between bracketing and open methods. Know how to use Newton-Raphson method. Know how to use secant and modified secant method. Know how to use MATLAB's fzero() function. Know how
5: Roots of Equations Bracketing Methods
Objectives
understand what roots problems are. determine a root graphically incremental search and its shortcomings bisection method error estimates for bisection false position method
ECOR2606 - Hassan & Holtz
Oct
3: Programming with MATLAB
Chapter Objectives
Learn how to write M-file programs to implement numerical methods:
Create well-documented M-files in the edit window and invoke them from command window. Set-up M-files so they interactively prompt users for i
2: Matlab Fundamentals
Chapter Objectives
Introduction and overview of Matlab command mode and its use in interactive computations.
Assignment of numbers (scalars) to variables. Assignment of vectors and matrices to variables; colon operator, linspace and