f



I need a lot of help...

I do not know how to do this exercise, does anyone help me?

Define the matrix_range (m) function that returns the range of an array calculated by the Gaussian method.

It should work with any number of rows and columns. No punctuation will be given to deliveries that do not respect this requirement.


Operating example:

>>> matrix_range ([[1,0,0], [0,1,0], [0,0,1]])
3
0
raulmaqueda6398
12/24/2016 10:27:05 AM
comp.lang.python 77058 articles. 5 followers. Post Follow

5 Replies
293 Views

Similar Articles

[PageSpeed] 13

El s=C3=A1bado, 24 de diciembre de 2016, 11:27:16 (UTC+1), raulmaq...@gmail=
..com  escribi=C3=B3:
> I do not know how to do this exercise, does anyone help me?
>=20
> Define the matrix_range (m) function that returns the range of an array c=
alculated by the Gaussian method.
>=20
> It should work with any number of rows and columns. No punctuation will b=
e given to deliveries that do not respect this requirement.
>=20
>=20
> Operating example:
>=20
> >>> matrix_range ([[1,0,0], [0,1,0], [0,0,1]])
> 3

I need to do it in python
0
raulmaqueda6398
12/24/2016 10:30:10 AM
raulmaqueda6398@gmail.com wrote:

> I do not know how to do this exercise, does anyone help me?
> 
> Define the matrix_range (m) function that returns the range of an array
> calculated by the Gaussian method.
> 
> It should work with any number of rows and columns. No punctuation will be
> given to deliveries that do not respect this requirement.
> 
> 
> Operating example:
> 
>>>> matrix_range ([[1,0,0], [0,1,0], [0,0,1]])
> 3

If this were not a homework problem you'd use numpy.linalg.matrix_range().
In your case, however, your teacher wants you to implement the algorithm 
yourself.

Do you know how to calculate the matrix range with pen and paper? 

Write down the steps in plain english and then try to implement them one 
after another in Python. Once you have some code and run into a problem you 
have something to show us, and we'll happily give you the hints necessary to 
fix it.

0
Peter
12/24/2016 11:15:52 AM
raulmaqueda6398@gmail.com <raulmaqueda6398@gmail.com> wrote:
> I do not know how to do this exercise, does anyone help me?

    If you have a specific, precise question, that's one thing.
Otherwise:

    http://lmgtfy.com/?q=Academic+Dishonesty

Phil
-- 
AH#61  Wolf#14  BS#89  bus#1  CCB#1  SENS  KOTC#4
hilb@philb.ca  http://philb.ca
0
Phil
12/24/2016 5:18:35 PM
On Sat, 24 Dec 2016 02:27:05 -0800 (PST), raulmaqueda6398@gmail.com wrote:
> I do not know how to do this exercise, does anyone help me?
> 
> Define the matrix_range (m) function that returns the range of an
> array calculated by the Gaussian method.
>
> It should work with any number of rows and columns. No punctuation
> will be given to deliveries that do not respect this requirement.
>
> Operating example:
>
>>>> matrix_range ([[1,0,0], [0,1,0], [0,0,1]])
> 3

I don't know any definition of "matrix range" that fits this description.
Is it possible that someone means "rank"?

-- 
To email me, substitute nowhere->runbox, invalid->com.
0
Peter
12/24/2016 11:49:18 PM
Peter Pearson <pkpearson@nowhere.invalid> writes:
> I don't know any definition of "matrix range" that fits this description.
> Is it possible that someone means "rank"?

Yes, the rank is the dimension of the range unless I'm mistaken.  I
think rank is what was meant.

To find the rank with Gaussian elimination, I guess you could
diagonalize the matrix then count the number of nonzero elements.  Maybe
there's a better way.
0
Paul
12/25/2016 3:08:11 AM
Reply: