cancel
Showing results for 
Search instead for 
Did you mean: 
Security Alert Log4j Security Vulnerability. Click here to know more.
cancel
Showing results for 
Search instead for 
Did you mean: 

LU Decomposition

Teddy
5-Regular Member

LU Decomposition

Anyone can help me reverse this program?

 

This program contains the lower left side triangle to be 0, and I want the program to run on the opposite side on the upper right to be 0.

 

My program does not seem to be working properly. If anyone can help me reverse "0" in the matrix, that would be a great help in my studies. 

 

Thank you.

15 REPLIES 15
LucMeekes
23-Emerald I
(To:Teddy)

Instead of (or next to) a picture, you should post your worksheet, or at least a worksheet that contains your specific problem. That will greatly help us help you.

Have you considered using the LU() function that is built into Prime?

 

Success!
Luc

Teddy
5-Regular Member
(To:LucMeekes)

I have been attaching my Prime file on the message for more than 1 hour, but it keeps on failing to attache the .mctx content type and keeps on getting removed. 

 

No, I haven't tried the LU() function on the Prime. I wanted to play with the basics for now before using the shortcut LU() function.

LucMeekes
23-Emerald I
(To:Teddy)

You should not attach an .MCTX  (template) file, but the .MCDX (worksheet) file...

And in case all else fails, you can zip the file and attach that archive.

 

Success!
Luc

Teddy
5-Regular Member
(To:LucMeekes)

It still says it doesn't match its file extension and has been removed. I already tried zipping it, the mcdx and the mctx, and it still fails.

 

Hi

Prime LU decomposition on your matrix in the file.  Usually the matrix should be square?

Capture.JPG

Cheers

Terry

 

Teddy
5-Regular Member
(To:terryhendicott)

I dont think it should be squared all the time. The last column is considered to be the constant. Was looking for a opposite side of my program, just to have the 3 "0" to be on the upper right side of the matrix.

 

I can do it manually, but I want to learn how to do the process by using the program of Mathcad Prime itself.

HI,

Found on the web the algorithm in C++ to calculate LU Decomposition of square matrices.

Converted side by side the C++ coding to Prime programming.

f_LU function gives the same answer as the web page example results.

It does not get the same answer as MathCad Prime LU function?.

It depends which L or U diagonal is normalized

 

Cheers

Terry

 

Hi

Only two changes to the algorithm to get it to work on Rectangular matrices.

Capture.JPG

Capture2.JPG

Cheers

Terry

Teddy
5-Regular Member
(To:terryhendicott)

The mathcad that I am using is 6.0. Is there any chance you could lower the version so I can see the continuation of the program?

 

Thank you.

Hi,

Some members of the community know how to save back from 7 to 6.  Trust they see this and can backdate it.

If you don't mind coding yourself here is the total program as screen shot.

Capture.JPG

Capture2.JPG

Cheers

Terry

Hi,

Have simplified the coding slightly that saves a few lines.  Work in progress.

Capture.JPG

Cheers

Terry

 

Teddy
5-Regular Member
(To:terryhendicott)

Thank you for the great program. I'll try to analyze it and try to understand the program better. I'm still struggling with programming using mathcad Prime. I really appreciated the help.

Hi,

Your welcome.

Cheers

Terry

Werner_E
24-Ruby IV
(To:Teddy)

Here is Terry's worksheet converted back to version Prime 6 - hope it works OK for you

Thanks Werner,

Teddy will be able to see the C++ code next to the Prime programming.

Cheers

Terry

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."