%
%
%
%
%
%
%
WaterPipe.m
-This program computes the water exit velocity for a gravity-driven pipe
system and determines the cost of the pipe for a range of different water
tank heights. A plot of water exit velocity vs. tank height (z) is
generated, and

Introduction to MATLAB
1. What is MATLAB?
a. Matrix Laboratory
b. Computer programming environment specially tailored to solving engineering problems
c. Basics (e.g. adding two numbers) to advanced computational modeling and 3D graphics
d. Difference from

Matlab Basics 4: Anonymous Functions and Modular Programming
Anonymous Functions
1. Last time, I showed you how to create a function
a. function output = function name (input 1, input 2, ) is first line in function m-file
b. input can be one or more varia

Lecture 2: MATLAB Basics: plotting, strings, input and output
Plotting
1. Recall from last time: x = linspace(0,10,100); (min, max, number of points)
2. y = sin(x);
3. plot(x,y);
a. Default is for line to connect all the points on the plot
b. Default colo

Lecture 3: Basics of MATLAB Programming
Introduction
The past couple of lectures have introduced you to basic MATLAB commands entered into to the
MATLAB Command Window. With complex or repetitive tasks, it becomes very inconvenient and
inefficient to just

Homework #5
MECH 3010: Elementary Numerical Methods and Programming
Spring 2016
DUE Thursday, March 3
Work out all 129 problems (one is on the next page) by hand and draw boxes around your answers.
You may use MATLAB to check your answers where applicabl