GEOG M128
W4L1
Key points on lecture
The 10 pieces to understanding what Neolithic city is?
o The main things from reading
Dont forget to submit questions
Assignment
o Look through news stories
o Write about relevant piece
What we covered. Look at syllab
GEOG M128
W1L1
Global Environment & Development Introduction
Neolithic revolution
o How early societies managed to create a hierarchical society
Pre-industrial society had a system of organization society?
Malthus
o Population increasing
o Resources wha
%Divendra Seeram
%004658032
%This script calculates the error of three euler's methods of
0ifferentiation. Each method, forward euler, backward euler, and central
%euler are completed within their own respective functions. The function
%itself and the exa
% Divendra Seeram
%UID: 004658032
% SIR model for Infection
%This script models the spread of an infectious disease using a model of
%three differential equations. They are solved simultaneously using euler's
%method. The DEs are iteratively solved with a
%Random Walker
%Divendra Seeram
%004658032
% In this script, we model the behavior of two random walkers with a monte
% carlo simulation. It will be determined if collision is more likely if
% one walker is moving, or if both walkers are moving. Given tha
% Divendra Seeram
%UID: 004658032
%DNA analysis
%In this script we are given a long array of digits 1-4, each one
%representing a base in a string of DNA. The purpose of the script is to
%interpret the array in terms of segment length, given that specific
%Random Walker
%Divendra Seeram
%004658032
% In this script, we model the behavior of two random walkers with a monte
% carlo simulation. It will be determined if collision is more likely if
% one walker is moving, or if both walkers are moving. Given tha
%Shared Birthday Problem
%Divendra Seeram
%004658032
%This script runs a Monte Carlo simulation to determine the number of
%people required for it to be more likely than not for two of the people in
%the group to have birthdays that are within one week fr
%Divendra Seeram
%004658032
%This script makes use of several functions in order to split and average a
et of points, effectively smoothing down the figure. The functions
%receive input arrays from the main script, and array w denoting the degree
%to whic
African agriculture
A green evolution
The farms of Africa are prospering at last thanks to persistence, technology and
decent government
Mar 12th 2016 | GITEGA | From the print edition
NOT so long ago Jean Pierre Nzabahimana
planted his fields on a hillsi
Vectorized Form:
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
Elapsed time is 0.248701 seconds.
Loop Form:
Elapsed time is 22.722971 seconds.
We observe that the time required to perform interpolation in loop form is much longer than that
needed
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
Since we will be using multiple h values for each x value, the script stores the results in a matrix that
has dimensions that are the length of array h by the length of array x. Such a matrix is initia
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
=
+1
Next we proceed to compute the slope d values using a for loop with if statements inside to
check for special conditions. The first special condition is when we are at the leftmost node, for
whi
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
For 1000 Evaluation Points:
The average error using linear interpolation is 0.0122.
The average error using cubic interpolation is 0.0063.
When we increase the number of evaluation points to 100,000 an
Homework 5
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
1. Numerical Differentiation
1.1
Introduction
The goal of this problem is to create MATLAB functions to numerically differentiate a given
function by two methods: the forward difference appr
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
After the plot is complete, the script moves on to compute the average error for linear interpolation.
The actual values are obtained by calling on the fx function for each xi value and the results are
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
Following, we loop through the output data using a for loop and check that the each xi value falls
inside the range of x and identify the two values that each specific xi value falls between using a
wh
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
We observe that as h gets very small, the average error values for both the forward and the central
difference approximation methods converge to a value around 0.315. The average error values of
the tw
Esther Hwang
UID: 904411480
CEE/MAE M20
July 26, 2016
and their respective absolute error values. The absolute error values are stored in an array, which we
then sum up and plug into the below formula for average error. We will have 50 total average error
%Lunar Phase calculate
%This script will estimate the lunar phase on a valid user generated date
'ased on the number of days since the new moon on JAN 1st, 1900. It will
%check if the user generated date is valid, and use given formulas to
0etermine the p
%Classifying Cubic Functions
%This script will classify a cubic function as simple, NOT simple,
%monotone. The script will accept the coefficients a,b,c, and d of
%general cubic equation q(x) = ax^3 + bx^2 + cx + d, and calculate
%roots of the derivative
%Binary Addition
%This script will accept two integers between 0 and 7. The script will then
%convert the two integers to binary, add them in binary, and print all
NULLalues in bot hbinary and decimal
%Divendra Seeram
%UID: 004658032
clear;
clc;
%Accept i
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Chapter 5
Abstraction
5.1 Reshaping Rectangles
A Square and a Root
5.2 Oval Odometer
Ellipse Perimeter
5.3 The Betsy Ross
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Chapter 4
The Discrete versus
the Continuous
4.1 Connect the Dots
Plotting Continuous Functions
4.2 From Cyan to Magenta
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Appendix C
MATLAB, Java, and C
Given the ubiquity and importance of computation tools, students do not commonly ask
why t
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Chapter 3
22 , 245 , 355 ,.
7 78 113
Approximation with
Fractions
3.1 22/7ths and Counting
Proximity to Pi
3.2 Not Quite
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Appendix A
Rened Graphics
A.1
Scaling Axes
A.2
Setting and Labelling Axis Ticks
A.3
Fancy Labelling
A.4 Aligning Text
A.5
Downloaded 01/10/17 to 169.232.212.243. Redistribution subject to SIAM license or copyright; see http:/www.siam.org/journals/ojsa.php
Appendix B
Mathematical Facts
The level of mathematical maturity assumed by this text can be anticipated by browsing
thro
clc;
close all;
clear all;
%ask for a and b
a = input('Input value for a: ');
b = input('Input value for b: ');
0printf('a = %1.3f\n', a);
0printf('b = %1.3f\n', b);
h = (a-b) / (a+b)^2;
P1 = pi * (a + b);
P2 = pi * sqrt(2*(a^2 + b^2);
P3 = pi * sqrt(2*(a