{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

107hw5

# 107hw5 - MAE 107 Homework 5 Numerical Methods in...

This preview shows pages 1–2. Sign up to view the full content.

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 .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

107hw5 - MAE 107 Homework 5 Numerical Methods in...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online