PART II: Do this in MATLAB 4. Create a vector X containing all integers from 1 to 100. Create a vector Y containing the following, in this order: [1, 0.9, 0.8, 0.7 ... 0.1, 0]. 5. Create a vector U containing the first 25 elements of X. Create a vector V containing elements 50 through 75 of X. Create a vector W containing all the elements of X with an even index. 6. Create a 3 x 3 matrix with all ones. Create a 8 x 1 matrix with all zeros. Create a 5 x 2 matrix with all elements equal to 0.37. 7. Create a 1 x 25 vector containing random elements distributed in the interval [-0.5, 0.5]. 8. Given matrix M = [1, 2, 3; 2, 1, 5; 4, 6, 4; 2, 3, 2], create its submatrix N containing first two rows and the first and the third column (i.e., row indexes i = 1, 2 and column indexes j = 1, 3). 9. Given vector A = [8, 6, 4] and integer number n = 4 create matrix B containing n-times a(1) in the first row, n-times a(2) in the second row, etc. (i.e. b = [8, 8, 8, 8; 6, 6, 6, 6; 4, 4, 4, 4]).
Added by Angela B.
Close
Step 1
Create vector X containing all integers from 1 to 100: $$\textbf{X} = [1, 2, 3, \dots, 100]$$ Show more…
Show all steps
Your feedback will help us improve your experience
Shyam P and 77 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Sri K.
Given matrices A = [9 12 13 0; 10 3 6 15; 2 5 10 3] and B = [1 4 2 11; 9 8 16 7; 12 5 0 3], provide short MATLAB commands to: a) Create a matrix called C which is A and B on top of each other. b) Create a matrix called D made up of the first two rows of A and the last two rows of B. c) Make the 3rd column of C be the numbers from 1 to 6. d) Add 1 to just the odd-index elements of A. e) Create the following matrix (i.e., do not type values, write a single-line MATLAB statement).
Adi S.
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Watch the video solution with this free unlock.
EMAIL
PASSWORD