lab2 - CSC 113, Fall 2010 Lab Assignment 2 1. From the...

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: CSC 113, Fall 2010 Lab Assignment 2 1. From the MATLAB command line, define the following vector and matrix variables: (a) 1 2.3 4.0 v1 = 5.6 9.0 −12 (b) v2 = [ −12 (c) −12 1−i v3 = sin(120◦ ) −9 9.1 + 6i 7 7 1.2 9 12 − e−1 4i 3.2 4.5 8.1 9.0 4π ln(12) 3 + i ∗ sin(20◦ ) −12i ] 3.4 e−3 tan−1 (0.5) 143 (d) Define a vector called v4 that runs from −1.6 to 1000.46 in steps of 0.5. (e) Define a vector called v5 that has 240 elements. It should start at −12 and end at 148. 2. Write a MATLAB script that generates the following matrices: (a) A 5 × 8 matrix called A in which rows alternate between −8 and 4: −8 −8 −8 −8 −8 −8 −8 −8 4 4 4 4 4 4 4 4 A = −8 −8 −8 −8 −8 −8 −8 −8 4 4 4 4 4 4 4 4 −8 −8 −8 −8 −8 −8 −8 −8 (b) A column vector called B that starts at −320, ends at 126, and has 1027 equally spaced values in it. ...
View Full Document

This note was uploaded on 02/29/2012 for the course CSC 113 taught by Professor Phillipregali during the Fall '10 term at Catholic University of America.

Ask a homework question - tutors are online