function [root_f,iter_f] = falseposition(f,xl,xu,precision)
% INPUTS:
% - f: function handle of the equation to be solved
% - xl: lower limit of the initial guess
% - xu: upper limit of the initial gu
ENG1060: Computing for Engineers
LECTURE 3
Matrices
Slides made by: Dr. Wai Ho Li
Lecture 2: MATLAB Basics
Recap
Matrices
Creating
Matrices
Matrix
Addressing
Lecture
Summary
MATLAB as a Calculat
function y= euler(dydt,xrange,y0,h);
% [t,y] = euler(dydt,tspan,y0,h):
% uses Euler's method to solve an ODE
% input:
% dydt = function handle of the ODE, f(t,y)
% tspan = [<initial value>, <final va
%comparing the efficiencies of the different methods
%Lab 6 Task 5(b)
clear all;
close all;
clc;
%parameters for root finding
xl=120;
xu=165;
xi=120;
xi_1=110;
pert=0.01;
precision=0.0001;
%input the
%comparing the efficiencies of the different methods
%Lab 6 Task 5(b)
clear all;
close all;
clc;
%parameters for root finding
xl=120;
xu=165;
xi=120;
xi_1=110;
pert=0.01;
precision=0.0001;
%input the
ENG1060 Computing for Engineers
Faculty of Engineering
Semester 1 - 2014
ENG1060 Computing for Engineers
Laboratory No. 8
This laboratory comprises 2% of your final grade. During your lab session,
you
ENG1060: Computing for Engineers
LECTURE 13
Roots and Optimization
Bracketing Methods
Lecturer: Dr. Chao Chen
[email protected]
Introduction to Numerical Methods
Introduction to
Numerical
Method
ENG1060 Computing for Engineers
Faculty of Engineering
Semester 1 - 2014
ENG1060 Computing for Engineers
Laboratory No. 9
This laboratory comprises 2% of your final grade. During your lab session,
you
ENG1060: Computing for Engineers
Faculty of Engineering
ENG1060: Computing for Engineers
2016 - Semester 2
Laboratory #2: Questions
This laboratory comprises 2% of your final grade. The questions are
MONASH
ENGINEERING
ENG1060
DATA TYPES AND LIMITATIONS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
THE DETAILS ARE IMPORTANT
MATLAB is a powerful tool for engineering computing but it has limitation
MONASH
ENGINEERING
ENG1060
ODEs: The midpoint method
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: The midpoint method
dy
= f t, y
dt
( )
The midpoint method is a different way o
MONASH
ENGINEERING
ENG1060
Ordinary Differential Equations (ODEs)
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: Introduction
We write the generic 1st order ODE
as dy = f t, y
dt
MONASH
ENGINEERING
ENG1060
Ordinary Differential Equations (ODEs):
Introduction
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: Introduction
Many fundamental laws of physics, mecha
MONASH
ENGINEERING
ENG1060
ODEs: Other solvers
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: Classical 4th order Runge-Kutta Method (RK4)
Still solving the ODE
dy
= f t, y
dt
( )
MONASH
ENGINEERING
ENG1060
ODEs: Heuns method
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: Heuns method
Karl Heun (1859-1929)
German mathematician
Famous for:
Heuns function
MONASH
ENGINEERING
ENG1060
ODEs: Error in Eulers method
Presented by Prof. Murray RUDMAN
Slides by M. Rudman
ENG1060
ODEs: Error in Eulers method
We saw previously from the Taylors series
dy
h2 d 2 y
ENG1060: COMPUTING FOR ENGINEERS
Lab 1 week 2
2017 S1
This laboratory comprises 2% of your final grade. The questions are designed to test your
recollection of the lecture material. You will be assess
% Written by: Amanda Veljanovski, ID: 28824199
% Last modified on : 6/03/2017
clear all; close all; clc;
%
a
b
c
abs : Absolute value
= abs(-5)
= [-1.3, 3, -5]
= abs(b)
% cosd : Cosine of argument in
MONASH
ENGINEERING
ENG1060
DEBUGGING
Presented by Tony Vo
Slides by Tony Vo
ENG1060
DEBUGGING
Debugging is the task of identifying and correcting errors (bugs) in code
Sometimes, identifying a bug is
MONASH
ENGINEERING
ENG1060
MATLAB LIMITATIONS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
ENG1060
MATLAB is not the focus of ENG1060!
MATLAB is only the tool
Your level of MATLAB is almost on par
MONASH
ENGINEERING
ENG1060
ADVANCED FUNCTIONS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
NOTICE
Some students dont know
That the video slides are available on Moodle
You do not need to watch th
MONASH
ENGINEERING
ENG1060
EFFICIENT CODING
Presented by Tony Vo
Slides by Tony Vo
ENG1060
EFFICIENT CODING
When you start dealing with complex and large problems, speed is important
Make sure your c
MONASH
ENGINEERING
ENG1060
FUNCTION HANDLES AND
ANONYMOUS FUNCTIONS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
FUNCTION HANDLES
A function handle is a variable that represents a function
It provi
MONASH
ENGINEERING
ENG1060
PART A: MARS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
MARS
A.
B.
C.
D.
Determine the output of the following command:
7 / 7 + 5 * 2 ^ 3 (9 0 / 4)
32
992
0
Error
2
ENG1
MONASH
ENGINEERING
ENG1060
MATRICES: CREATING 1D MATRICES
Presented by Tony Vo
Slides by Tony Vo
ENG1060
WHAT IS A MATRIX?
Matrix structure: rows first, then columns (rows-by-columns)
=1
(scalar)
= 1
MONASH
ENGINEERING
ENG1060
WELCOME TO ENG1060:
COMPUTING FOR ENGINEERS
Presented by Tony Vo
Slides by Tony Vo
ENG1060
MATLAB
Use MATLAB to
Think as an engineer
Develop problem solving techniques
Under