ME 318M
Programming and Engineering Computational Methods
Spring 2016
Homework #2
Assigned: January 29th, 2016
Due: February 4th, 2016 at start of lecture
Name: _
Section Unique Number:_
UID: _
Please enclose relevant printouts of the code you wrote and t
ME 318M
Programming and Engineering Computational Methods
Spring 2016
Homework # 1
Assigned: January 22th, 2016
Due: January 28th, 2016 (at start of lecture)
Name: _
Section Unique Number:_
UID: _
Please enclose relevant printouts of the code you wrote an
ME 318M Programming and Engineering Computational
Methods
Homework #11
Assigned: April 21st, 2016
Due: April 28th, 2016
Name: _
Section Unique Number: _
UID: _
All problems must be solved by hand save your use of computers (or programming) for the
labs. T
ME 318M Programming and Engineering Computational
Methods
Homework #6
Assigned: February 28th, 2016
Due: March 10th, 2016
Name: _
Section Unique Number: _
UID: _
Please turn in your answers on paper. Show steps for two iterations for full credit.
Problem
ME 318M Programming and Engineering Computational
Methods
Homework #5
Assigned: February 19th, 2015
Due: February 25th, 2015
Name: _
Section Unique Number: _
UID: _
Please turn in your answers on paper. No programming is required for this assignment.
Prob
ME 318M Programming and Engineering Computational
Methods
Homework #8
Assigned: March 27th, 2016
Due: March 31th, 2016
Name: _
Section Unique Number: _
UID: _
This assignment is to be worked on paper so usage of computers is not accepted. Please
show your
ME 318M Programming and Engineering Computational
Methods
Homework #10
Assigned: April 16th, 2016
Due: April 21st, 2016
Name: _
Section Unique Number: _
UID: _
All problems must be solved by hand save your use of computers (or programming) for the
labs. C
ME 318M Homework 2 - Solution
Problem 1 - Save, Load and Manipulate Data . 1
Problem 2 - Creating and displaying Fibonacci Sequence . 3
% Homework 2 - ME 318M
clear all
clc
% clear variables in workspace
% clear command window
Problem 1 - Save, Load and M
ME 318M Homework 6 Solution
Problem 1.1
Problem 2.1
Problem 3.2
Problem 4.2
Problem 5.2
Problem 1
Formula:
1 = 0 1 ( )
where is the Jacobian matrix.
Iteratio
ME 318M Homework 3 - Solution
Problem 1 - Interaction with user . 1
Problem 2 - User created array and manipulation . 2
Problem 3 - User created integer array . 3
% Homework 3 - ME 318M
clear all
clc
% clear variables in workspace
% clear command window
P
HOMEWORK 8 - SOLUTION
Problem 1
The derivative of the system is given by the following function:
function dydx = derivative_81(x,y)
dydx= 1-x*y;
Application code for Heuns Method:
function [x,y] = Heuns(der_fun,x0,y0,step,x_final)
x = [x0:step:x_final]';
ME 318M Homework 4 - Solution
Problem 1 - Function to Revert a String .1
Problem 2 - Bisection root finder .2
% Homework 4 - ME 318M
clear all
% clear variables in workspace
clc
% clear command window
Problem 1 - Function to Revert a String
In this questi
ME 318M Programming and Engineering Computational
Methods
Homework #4
Assigned: February 12th, 2016
Due: February 18th, 2016
Name: _
Section Unique Number: _
UID: _
Please enclose relevant printouts of the code you wrote and the output of the code in MATL
ME 318M Programming and Engineering Computational
Methods
Homework #7
Assigned: March 16th, 2016
Due: March 24th, 2016
Name: _
Section Unique Number: _
UID: _
This assignment is to be worked on paper so usage of computers is not accepted (except for
Probl
ME 318M Programming and Engineering Computational
Methods
Homework #3
Assigned: February 6th, 2016
Due: February 11th, 2016
Name: _
Section Unique Number: _
UID: _
Please enclose relevant printouts of the code you wrote and the output of the code in
MATLA
ME 318M
Programming and Engineering Computational Methods
Spring 2016
Homework # 1
Assigned: January 22th, 2016
Due: January 28th, 2016 (at start of lecture)
Name: _
Section Unique Number:_
UID: _
Please enclose relevant printouts of the code you wrote an
Chapter 3
Functions and Visualizing Data
3.1
Functions and Subroutines
Functions can be thought of independent programs in themselves. They allow the programmer
to dene a specic action that (usually) takes in some data, does some processing, and returns
a
Chapter 3
Functions and Visualizing Data
3.1
Functions and Subroutines
Functions can be thought of independent programs in themselves. They allow the programmer
to define a specific action that (usually) takes in some data, does some processing, and retur
ME 318M Programming and Engineering Computational
Methods
Homework #5
Assigned: March 10, 2017
Due: Thursday, March 23, 2017
Name: _
Section Unique Number: _
UT EID: _
Problem 1 (Matrix Inversion)
Use the Gauss-Jordan method to invert the following matric
Chapter 2
Programming in Matlab
A program is a sequence of step-by-step commands to perform one or multiple tasks. Up until
now you have been entering commands one by one in the COMMAND PROMPT but a program
allows you to enter multiple commands to be run
ME 318M Programming & Eng Computational Methods
Homework # 1
Assigned: January 26, 2017
Due: AT THE START OF CLASS, February 2, 2017
Name: _Section Unique #: _ UT EID: _
Do all calculations in MATLAB. You may confirm results on a calculator. Submit your
M
Chapter 4
Algorithms, Programming Logic and
Debugging
4.1
Introduction
In this lab, we will focus on bringing together all the programming skills that we have learned
so far from the previous labs.
4.2
Understanding Algorithms
An algorithm is a step-by-st
1
ME 318: Programming and Engineering Computational Methods
using MATLAB
Authors:
Prashant Rao
PhD student in Mechanical Engineering
Dr. Ashish D. Deshpande
Assistant Professor in Mechanical Engineering
The University of Texas at Austin
Copyright 2010
Con
ME 318M Programming & Engrg Computational Methods
Homework #4
Assigned: February 16, 2017
Due: February 28, 2017
Name: _
Section Unique Number: _
UT EID: _
Please enclose relevant printouts of any code you wrote and the outputs of the code in
MATLABs work
ME 318M Programming and Engineering Computational
Methods
Homework # 2
Assigned: February 2, 2017
Due: February 9, 2017, at the start of class
Name: _
Section Unique Number:_
UID: _
Please enclose relevant printouts of the code you wrote and MATLABs comma
ME 318M Programming and Engineering Computational
Methods
Homework #3
Assigned: Feb. 9, 2017
Due: Fe. 16, 2017
Name: _
Section Unique Number: _
UID: _
Please enclose relevant printouts of the code you wrote and the output of the code in
MATLABs workspace.
% 5.1: Functions F and G.
clf
X = [-10 : .1 : 20];
Y = FunctionF(X);
xlabel('x axis')
ylabel('y axis')
title('Graph of Function F')
hold on
grid on
plot(X,Y)
%5.2 Using Data Cursor tool, F(x) goes to zero at x = -0.7 and 2.3
%5.3 Bisection Method
xb = 2;
ME 318M Homework 1 - Solution
Problem 1 - Basic calculations . 1
Problem 2 - Look at the effect of round off errors . 2
Problem 3 - Acquire user age and print it back to them. . 3
Problem 4 - A series of queries and interactions based on responses . 4
% H