Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Get familiar with MATLAB command window Learn to define and work with vectors an

ID: 3404533 • Letter: G

Question

Get familiar with MATLAB command window Learn to define and work with vectors and matrices in MATLAB In MATLAB command window type in the commands for the following items: Define the row vector A = [9 - 7] Access the 2nd element from vector A Define the row vector B = [-50 -48 -46 -0]. Note that B is a vector which contains 26 elements. Define vector C with 10 linearly spaced elements between 0 and 10 Define the matrix: D = [-9 0 7 pi 3 squareroot 5 9 4 -8 8 0] Access element '7 pi' in matrix D Access the 3rd column of matrix D Please record the MATLAB commands and results in your Activity Report for this unit.

Explanation / Answer

>> A=[9 -7]

A =

     9    -7

>> A(1,2)

ans =

    -7

>> B=-50:2:0

B =

Columns 1 through 15

   -50   -48   -46   -44   -42   -40   -38   -36   -34   -32   -30   -28   -26   -24   -22

Columns 16 through 26

   -20   -18   -16   -14   -12   -10    -8    -6    -4    -2     0

>> C=0:1:10

C =

     0     1     2     3     4     5     6     7     8     9    10

>> D=[-9 0 -7*pi; 3*sqrt(5) 9 4; -8 8 0]

D =

   -9.0000         0 -21.9911
    6.7082    9.0000    4.0000
   -8.0000    8.0000         0

>> D(1,3)

ans =

-21.9911

>> D(3,1:3)

ans =

    -8     8     0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote