{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

PGE310 - HW2 - Solution

# PGE310 - HW2 - Solution - The University of Texas at Austin...

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

The University of Texas at Austin PGE 310:Formulation and Solution in Geosystems Engineering Homework #2: Matrix operation and Plotting with MATLAB SOLUTION 1. For all of the following sections use a single command in MATLAB to create the answer. Print out your commands and the results and box/highlight your results. (40%) (Part a 5 Pts others 2.5 Pts) a. Create a vector, a, that starts at 10 10 , ends at 1, decreased logarithmically, and has 5 elements. You may want to use the command “format long” so that digits aren’t truncated. After the problem, you may want to go back to “format short” b. Use a built-in function to create a vector, b, with 10 elements. Elements 1 to 5 start at -5, end at -3, and increased by 0.5. Elements 6 to 10 start at 10, end at 14 and increased by 1 c. Create vectors u , v , w and x . 4 2 3 1 u 2 5 3 1 v 3 4 1 2 w 5 1 2 3 x d. Create a 4by4 matrix, A, which is a combination of matrices u through x such that the first column is u the second column is v , the third column is w .and the forth column is x e. Create a 4x4 matrix, B, of random numbers ranging from -2 to 4

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

View Full Document