comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Determinant of a matrix
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Determinant of a matrix [message #86569] Wed, 20 November 2013 04:09 Go to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
Hi

I want to check the linear independence of the columns on my matrix. I found the function DETERM() but this works only in cases where the matrix is NXN. In my case the matrix is NX4 (N-rows, 4-columns).

How can I calculate the determinant of that matrix?

Many Thanks
Ma
Re: Determinant of a matrix [message #86570 is a reply to message #86569] Wed, 20 November 2013 04:44 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 20.11.2013 13:09, fd_luni@mail.com wrote:
> the function DETERM() works only in cases where the matrix is NXN

OMG what could be the reason for this choice? Once again, IDL
developpers did everything wrong ;-)
Re: Determinant of a matrix [message #86571 is a reply to message #86570] Wed, 20 November 2013 04:58 Go to previous messageGo to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
On Wednesday, 20 November 2013 12:44:56 UTC, Fabien wrote:
> On 20.11.2013 13:09, fd_luni@mail.com wrote:
>
>> the function DETERM() works only in cases where the matrix is NXN
>
>
>
> OMG what could be the reason for this choice? Once again, IDL
>
> developpers did everything wrong ;-)

I used some functions to create the data in this matrix and I want to check that the columns of this matrix are indeed linearly independent in order to make sure if there is a need to replace my functions with something else.
Re: Determinant of a matrix [message #86574 is a reply to message #86569] Wed, 20 November 2013 05:37 Go to previous messageGo to next message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
Le mercredi 20 novembre 2013 13:09:48 UTC+1, fd_...@mail.com a écrit :
> Hi
>
>
>
> I want to check the linear independence of the columns on my matrix. I found the function DETERM() but this works only in cases where the matrix is NXN. In my case the matrix is NX4 (N-rows, 4-columns).
>
>
>
> How can I calculate the determinant of that matrix?
>
>
>
> Many Thanks
>
> Ma

> How can I calculate the determinant of that matrix?
You cannot, because determinant is not defined for a non square matrix.

> I want to check the linear independence of the columns on my matrix
What you are asking for is the rank of your matrix (i.e., mathematically, the number of independent columns). Matrix rank can be determined by singular value decomposition: the rank is the number of singular values which are not zero. In IDL, you can write:

if A is your matrix:
IDL> LA_SVD, A, W, U, V
IDL> rank_of_A = N_elements(W[where(W ne 0)])

alx.
Re: Determinant of a matrix [message #86575 is a reply to message #86574] Wed, 20 November 2013 06:57 Go to previous messageGo to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
> What you are asking for is the rank of your matrix (i.e., mathematically, the number of independent columns). Matrix rank can be determined by singular value decomposition: the rank is the number of singular values which are not zero. In IDL, you can write:
>
>
>
> if A is your matrix:
>
> IDL> LA_SVD, A, W, U, V
>
> IDL> rank_of_A = N_elements(W[where(W ne 0)])
>
>
>
> alx.

I got 4 singular values so the rank(A)=4? This means that the four rows are linearly independent? The eigenvalues are look like this:
235042.27 10979.266 286.59332 7.6813673
Re: Determinant of a matrix [message #86576 is a reply to message #86574] Wed, 20 November 2013 06:59 Go to previous messageGo to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
>
>

> What you are asking for is the rank of your matrix (i.e., mathematically, the number of independent columns). Matrix rank can be determined by singular value decomposition: the rank is the number of singular values which are not zero. In IDL, you can write:
>
>
>
> if A is your matrix:
>
> IDL> LA_SVD, A, W, U, V
>
> IDL> rank_of_A = N_elements(W[where(W ne 0)])
>
>
>
> alx.

I got 4 singular values so the rank(A)=4? This means that the four rows are linearly independent? The singular values are look like this:
235042.27 10979.266 286.59332 7.6813673
Re: Determinant of a matrix [message #86577 is a reply to message #86569] Wed, 20 November 2013 07:40 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, November 20, 2013 4:09:48 AM UTC-8, fd_...@mail.com wrote:
> Hi
>
>
>
> I want to check the linear independence of the columns on my matrix. I found the function DETERM() but this works only in cases where the matrix is NXN. In my case the matrix is NX4 (N-rows, 4-columns).
>

Maria, are you going to delete your posts again?
Re: Determinant of a matrix [message #86578 is a reply to message #86577] Wed, 20 November 2013 07:53 Go to previous messageGo to next message
fd_luni is currently offline  fd_luni
Messages: 66
Registered: January 2013
Member
> Maria, are you going to delete your posts again?

I had delete my post before because instead of singular values I wrote eigenvalues which is wrong designation. I didn't know how to edit my post that is why I had delete it and re post it correctly. I didn't know that we are not allowed to delete our posts. Sorry about that.
Re: Determinant of a matrix [message #86579 is a reply to message #86578] Wed, 20 November 2013 08:33 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, November 20, 2013 7:53:22 AM UTC-8, fd_...@mail.com wrote:
>> Maria, are you going to delete your posts again?
>
>
>
> I had delete my post before because instead of singular values I wrote eigenvalues which is wrong designation. I didn't know how to edit my post that is why I had delete it and re post it correctly. I didn't know that we are not allowed to delete our posts. Sorry about that.

Well, you deleted two posts in your "Derivatives" thread, not just one.

You can do whatever you want, but if you delete your posts, I'm going to recommend that people don't respond. Deleting one's posts is unfair to other readers and to people that try to respond to the post.

Nobody can edit posts. If you make an error - that's fine, everybody does - then just post a follow-up correcting the error.

CM
Re: Determinant of a matrix [message #86580 is a reply to message #86579] Wed, 20 November 2013 08:46 Go to previous messageGo to next message
Mats Löfdahl is currently offline  Mats Löfdahl
Messages: 263
Registered: January 2012
Senior Member
Den onsdagen den 20:e november 2013 kl. 17:33:20 UTC+1 skrev Craig Markwardt:
> On Wednesday, November 20, 2013 7:53:22 AM UTC-8, fd_...@mail.com wrote:
>
>>> Maria, are you going to delete your posts again?
>
>> I had delete my post before because instead of singular values I wrote eigenvalues which is wrong designation. I didn't know how to edit my post that is why I had delete it and re post it correctly. I didn't know that we are not allowed to delete our posts. Sorry about that.
>
> Well, you deleted two posts in your "Derivatives" thread, not just one.
>
> You can do whatever you want, but if you delete your posts, I'm going to recommend that people don't respond. Deleting one's posts is unfair to other readers and to people that try to respond to the post.
>
> Nobody can edit posts. If you make an error - that's fine, everybody does - then just post a follow-up correcting the error.

Deleting posts in google groups is also not very effective. They may disappear from google but many proper usenet news servers ignore such deletes. Which is another reason to do corrections in followups rather than by trying to replace posts with new versions.
Re: Determinant of a matrix [message #86582 is a reply to message #86580] Wed, 20 November 2013 09:04 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 11/20/13 11:46, Mats Löfdahl wrote:
> Den onsdagen den 20:e november 2013 kl. 17:33:20 UTC+1 skrev Craig
> Markwardt:
>> On Wednesday, November 20, 2013 7:53:22 AM UTC-8, fd_...@mail.com
>> wrote:
>>
>>>> Maria, are you going to delete your posts again?
>>
>>> I had delete my post before because instead of singular values I
>>> wrote eigenvalues which is wrong designation. I didn't know how
>>> to edit my post that is why I had delete it and re post it
>>> correctly. I didn't know that we are not allowed to delete our
>>> posts. Sorry about that.
>>
>> Well, you deleted two posts in your "Derivatives" thread, not just
>> one.
>>
>> You can do whatever you want, but if you delete your posts, I'm
>> going to recommend that people don't respond. Deleting one's posts
>> is unfair to other readers and to people that try to respond to the
>> post.
>>
>> Nobody can edit posts. If you make an error - that's fine,
>> everybody does - then just post a follow-up correcting the error.
>
> Deleting posts in google groups is also not very effective. They may
> disappear from google but many proper usenet news servers ignore such
> deletes. Which is another reason to do corrections in followups
> rather than by trying to replace posts with new versions.

Yeah, I was gonna ask about that. I get all the posts (including the
apparently deleted ones).

AFAICT, once you click "send", clicking "delete" is an exercise in
wishful thinking.

Craig needs to use a different news reader/provider/whatevs methinks. :o)

cheers,

paulv
Re: Determinant of a matrix [message #86585 is a reply to message #86582] Wed, 20 November 2013 18:33 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Wednesday, November 20, 2013 9:04:57 AM UTC-8, Paul van Delst wrote:
> Craig needs to use a different news reader/provider/whatevs methinks. :o)

The servers I've used in the past have all been shut down, so now I default to Google Groups, which does honor post cancellations. I know it's not "real" but I don't want to spend the time or the money to get any "realler." :-)

Craig
Re: Determinant of a matrix [message #86587 is a reply to message #86585] Thu, 21 November 2013 05:20 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
On 11/20/13 21:33, Craig Markwardt wrote:
> On Wednesday, November 20, 2013 9:04:57 AM UTC-8, Paul van Delst
> wrote:
>> Craig needs to use a different news reader/provider/whatevs
>> methinks. :o)
>
> The servers I've used in the past have all been shut down, so now I
> default to Google Groups, which does honor post cancellations. I
> know it's not "real" but I don't want to spend the time or the money
> to get any "realler." :-)

FWIW, I use nntp.aioe.org through TBird.

It's free, provided you don't post a bzillion messages a day. Good spam
filters too.

cheers,

paulv
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Calendar with days of the week
Next Topic: How to create 4D data matrix from 1D arrays?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:32:33 PDT 2025

Total time taken to generate the page: 0.00518 seconds