Write a function that returns an n x m matrix with elements

$24.99 $18.99

Write a function that returns an n x m matrix with elements that have the following values. The value of each element in the first row is the number of the column. The value of each element in the first column is the number of the row. The rest of the elements each has a…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

Write a function that returns an n x m matrix with elements that have the following values.

  • The value of each element in the first row is the number of the column.

  • The value of each element in the first column is the number of the row.

  • The rest of the elements each has a value equal to the sum of the element above it and element to the left.

  • The function must return a sensible error if the user does not input exactly two arguments

  • The function should be well commented

1

Write a function that returns an n x m matrix with elements
$24.99 $18.99