cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Gauss_Jordan.mcd , need to correct for determinant ?

lvl107
20-Turquoise

Gauss_Jordan.mcd , need to correct for determinant ?

Hello Everyone.
From :

Gauss_Jordan.mcd.PNG
refer to :
https://community.ptc.com/t5/Mathcad/Gauss-Jordan-rref/m-p/273580#M106899


How to correct Gauss_Jordan.mcd for determinant ?


Thanks in advance for your time and help.
Best Regards.
Loi.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:lvl107)

Just the determinant?

So how about a small modification in Alvaro's RREF?

Werner_E_0-1680316267529.png

Sure could be done more efficient, but for a quick hack it seems to work OK. No error  check (matrix square, etc.) is done. I simply changed the program to return 0 if no suitable pivot element could be found.

It also works symbolically, at least as long as only numbers are used. It fails symbolically when variables are used because the if-conditions can't be evaluated symbolically without knowing their actual values.

 

View solution in original post

18 REPLIES 18
ttokoro
20-Turquoise
(To:lvl107)

Your code is ok. But your data A is not able to make A^-1 because the 0 0 3 9 and 0 0 5 15 are same.

ttokoro_0-1680219369354.png

 

 


image.pngimage.pngimage.pngimage.pngimage.png

lvl107
20-Turquoise
(To:ttokoro)

Many thanks for your response, Ttokoro. My Mathcad 15 with your code is the following :

I.PNG

 

                                                    ___

 

II.PNG

  

     But I still got stuck to keep going to write a code for symbolic evaluate a DETERMINANT of a matrix above. My question is "How to write a code for SYMBOLIC evaluate a DETERMINANT of a matrix and with a Gauss-Jordan method or any other idea."

    Best Regards.

         Loi.

lvl107
20-Turquoise
(To:lvl107)

   And a similar code using Gauss-Jordan method, in the forum, is :

 

III.png

 

 

  But I would like to have a symbolic evaluate result is : ==> 0

ttokoro
20-Turquoise
(To:lvl107)

image.pngimage.pngimage.png

lvl107
20-Turquoise
(To:ttokoro)

 

   I know what you mean, Ttokoro, but my question has ONLY mentioned about " How to WRITE a CODE for calculate a DETERMINANT evaluate SYMBOLICALLY ? " and has NOT mentioned about how write a code for INVERSE of a matrix in this moment .

   And the above GJ([ matrix ]) ===> 0 , my Mathcad15 say "undefined" :

 

1.png

 

   Best Regards.

       Loi.

lvl107
20-Turquoise
(To:lvl107)

4.png

lvl107
20-Turquoise
(To:lvl107)

5.png

lvl107
20-Turquoise
(To:lvl107)

6.png

lvl107
20-Turquoise
(To:lvl107)

7.jpg

lvl107
20-Turquoise
(To:lvl107)

8.jpg

lvl107
20-Turquoise
(To:lvl107)

9.jpg

_________________________________________________________________________________________________________________

 

10.jpg

 

lvl107
20-Turquoise
(To:lvl107)

11.jpg

 

12.jpg

 

13.jpg

lvl107
20-Turquoise
(To:lvl107)

14.jpg

 

15.jpg

lvl107
20-Turquoise
(To:lvl107)

16.jpg

 

17.jpg

lvl107
20-Turquoise
(To:ttokoro)

18.jpg

Werner_E
25-Diamond I
(To:lvl107)

Just the determinant?

So how about a small modification in Alvaro's RREF?

Werner_E_0-1680316267529.png

Sure could be done more efficient, but for a quick hack it seems to work OK. No error  check (matrix square, etc.) is done. I simply changed the program to return 0 if no suitable pivot element could be found.

It also works symbolically, at least as long as only numbers are used. It fails symbolically when variables are used because the if-conditions can't be evaluated symbolically without knowing their actual values.

 

lvl107
20-Turquoise
(To:Werner_E)

2.png

 

   I really appreciate your time and help, Werner. 😊 🤔 🙄 especially your explanation. 

And I guess now it's time keep going with Alvaro's RREF and modify his CODE for inverse of a square matrix. ( I guess I would still be helped more ... ).

 Thanks again,

    Best Regards.

        Loi. 

lvl107
20-Turquoise
(To:lvl107)

A small modification in Tom Gutman's det( ) ?

 

3.png

 

for symbolic evaluate result.

Announcements

Top Tags