assign the number of rows to a variable

asked 2013-02-15 18:19:58 +0100

rd256 gravatar image

I am new to sage and have to write a function that reduced a matrix to row-echelon form. How do I assign the number of rows to the variable i inside a user-defined function?

edit retag flag offensive close merge delete

Comments

Your question is unclear. Are you asking about how to get the number of rows of a matrix? Use `M.nrows()` to get this. Are you asking about how to get this value and assign to a variable `i`? If you are asking this question, then use `i = M.nrows()` and read up about the Python programming language. EDIT: If this is homework, then please don't post homework questions here.

ppurka gravatar imageppurka ( 2013-02-15 19:43:32 +0100 )edit