class3a_matlab_activities_engr195(II)s10

# class3a_matlab_activities_engr195(II)s10 - ENGR 19500(II...

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

ENGR 19500(II) – Spring 2010 Activity 1 Class 3a Activity 1: MATRIX MANIPULATIONS (Estimated Time: 10 minutes) Through this exercise you will learn how to change values and manipulate matrices in MATLAB. Answer the questions in Activity 1 using the 3x4 matrix provided below. 1. At the MATLAB prompt in the Command Window, create the matrix called Amatrix . Type the following commands one at a time. In your notebook, write the function of these commands. Command Function ?? >>Bvector=Amatrix(1,:) >>Cvector=Amatrix(2,:) >>Dvector=Amatrix(:,3) >>sort(Dvector) >>Amatrix(3)= 30; >>Amatrix >>Evector= linspace(1,25,4) >>Fvector=Evector*5 >>Amatrix(1:2) >>Amatrix(2:3) >>Amatrix(1:2,2:3) 2. For the given functions, indicate the command you need to use. Try to come up with more than one method to perform the indicated function. Command (Method 1) Command (Method 2) Function Create a Bmatrix by replacing the middle row of Amatrix with the Bvector . Create the

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.

## This note was uploaded on 08/25/2011 for the course ENGR 195 taught by Professor Staff during the Fall '08 term at Purdue.

### Page1 / 5

class3a_matlab_activities_engr195(II)s10 - ENGR 19500(II...

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

View Full Document
Ask a homework question - tutors are online