# hw1.docx - ENED 1091 Engineering Models II Homework...

• Homework Help
• 5
• 100% (1) 1 out of 1 people found this document helpful

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

ENED 1091: Engineering Models II Homework Assignment #1 Due: Week of January 22 nd at the beginning of your Recitation Section Problem 1 : Array Indexing For this problem, you will need to download the HW1.mat file from Blackboard. Drop it in your current MATLAB folder then type: load HW1 at the MATLAB command prompt. You should now have the following three variables (x, y, and M) in your workspace with the values shown below. Don’t make any modifications to these variables. x = 4 5 -1 5 3 -2 0 2 5 5 -1 5 5 3 4 y = -1 5 5 4 5 3 -2 4 5 3 4 3 1 3 -1 M = 2 2 3 2 -4 -5 -2 7 3 0 -2 5 -3 -2 5 -5 -5 0 2 -2 -4 -1 -1 2 1 4 -1 2 -4 -3 For all parts of this problem, don’t put a semicolon at the end of your command so you can copy the results as well as your MATLAB command. a) What MATLAB command will pull out entries 7 thru 12 in vector, x, and store them in a vector called a? Command and Results: a = x (7:12) a = 7 8 9 10 11 12 b) What MATLAB command will pull out every other entry of the vector, x, starting at entry 4 and ending at entry 12 and store these entries in a vector called b? Command and Results: b = x (4:2:12) b = 4 6 8 10 12 c) What MATLAB command will pull out the7 in matrix, M, and store it in a scalar variable called c?

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

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

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern