What is Row & Column Vectors?

    What is Row & Column Vectors?

     

    Team Leader Asked on December 6, 2017 in MATLAB.
    Add Comment
    1 Answer(s)

      Row vectors:
      Row vectors are created by enclosing the set of elements in square brackets, using space or comma to delimit the elements.
      r1 = [1 2 3 4 5] OR r1 = [1,2,3,4,5]
      Output:−

       

      r1 =
      1 2 3 4 5
      

       

      Column Vectors:
      Column vectors are created by enclosing the set of elements in square brackets, using semicolon to delimit the elements.
      col = [1;2;3;4;5]
      Output:−

      col =
      1
       2
       3
       4
       5
      

       

      IT Head Answered on January 23, 2018.
      Add Comment

      Your Answer

      By posting your answer, you agree to the privacy policy and terms of service.