Ruby | Matrix row() function
The row() is an inbuilt method in Ruby returns a vector that contains all the elements in the given row-number. Syntax: mat1.row(num) Parameters: The function takes a mandatory parameter row, whose elements are to be returned in a vector. Return Value: It returns a vector containing all the elements