This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: MAE 107 - Homework # 5 Numerical Methods in Engineering Prof. Alison Marsden Due date: Friday May 6, 2011 Problem 1 - (MATLAB) Using a function as input to another function There are several ways in which a function can be passed in the input argument list of another function. The function to be used in the input list can be written as an inline function (See Section 3.5.1 of Pratrap) or it can be coded in a function file. How the function is passed in the input list depends on how it is coded. Code the function y ( x ) = sin ( x ) x as an inline function sinc and in a function file called sincfun.m . You will use this function in the input list of ezplot (see section 3.8 of Pratrap) in various ways in the following instructions: (a) Use the inline function sinc in the input list of explot to plot the function over the default domain. (b) Use the function sincfun as a string in the input list of ezplot to plot the function over the default domain. (c) Create a function handle for sincfun and use the handle in the input list of ezplot to plot the function over the default domain. Problem 2 - (MATLAB) Linear Algebra Find the solution of the following set of linear algebraic equations, as advised below: x + 2 y + 3 z = 1 3 x + 3 y + 4 z = 1 2 x + 3 y + 3 z = 2 ....
View Full Document
This note was uploaded on 01/15/2012 for the course MAE 107 taught by Professor Rottman during the Spring '08 term at UCSD.
- Spring '08