# fds - Part 1 of 1 Vectors Question 1 of 10 100.0 Points...

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

Part 1 of 1 - Vectors 100.0 Points Question 1 of 10 10.0 Points When using the range specification/colon operator method, which is in the form of vec = a : increment : b; the numbers a and b are always guaranteed to be in the vector. A. True B. False Question 2 of 10 10.0 Points When using the linspace method, which is in the form of vec = linspace(a, b, number_of_points); the numbers a and b are guaranteed to be in the vector, as long as number_of_points is greater than 2. Question 3 of 10 10.0 Points Given: vec = linspace(0, 25); What is length(vec) equal to? Question 4 of 10 10.0 Points The line of code: vec = 3:10; is equivilant to which line of code? Question 5 of 10 10.0 Points Which line of code will create the vector: vec = [5 4 3 2 1] A. vec = 5:1; B. vec = 1:-1:5; C. vec = 1:5; D. vec = 5:-1:1; E. vec = linspace(1, 5); Question 6 of 10 10.0 Points Which of the following generates 10 random numbers from 5 to 7?

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

View Full Document
Question 7 of 10 10.0 Points Given the vector: vec = [2 4 6 8 10 12 14]; and the code: vec2 = vec([2 5 7]); What is vec2? Question 8 of 10 10.0 Points What are the three main methods to creating vectors? Question 9 of 10 10.0 Points When indexing vectors in MATLAB, the index numbers must be positive integers, aka integers greater than or equal to 1. A. True B. False Question 10 of 10 10.0 Points Given the vector: vec = [1 3 2 8 9]; Which of the following lines of code will not generate an error? Part 1 of 3 - Advanced Vector Indexing 2.0 Points Question 1 of 2 1.0 Points Given a vector vec with values between 1 and 10, how would you define a vector vec2 to contain all of the values of vec between 2 and 6?
Question 2 of 2 1.0 Points Assume coordinate pairs are defined like so: x = [2 4 4 2 2 4 2]; y = [1 3 2 4 3 5 4]; How do I define y2 so that y2 only contains y values where x is equal to 2? (That is, y2 = [1 4 3 4]) Part 2 of 3 - Arrays 4.0 Points

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 ]}

### 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