Concept explainers
Create the following
C = [1.5 2 2.5 3 3.5 4 4.5 5 9.6 9.1 8.6 8.1 7.6 7.1 6.6 6.l]
Then use MATLAB’s built-in reshape
By writing one command and using the colon to address a
(a) Create a eight-element column vector named Da that contains the elements of the first and third rows of D.
(A) Create an eight-element raw vector named Db that contains the elements of the second and the fourth columns of D.
(c) Create a eight-element row vector named Dc that contains the first two elements of the first row, the last three elements of the second column, and the first three elements of the fourth row of D.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
MATLAB: An Introduction with Applications
- Linear Algebra: A Modern IntroductionAlgebraISBN:9781285463247Author:David PoolePublisher:Cengage LearningAlgebra & Trigonometry with Analytic GeometryAlgebraISBN:9781133382119Author:SwokowskiPublisher:CengageElementary Linear Algebra (MindTap Course List)AlgebraISBN:9781305658004Author:Ron LarsonPublisher:Cengage Learning