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.
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?
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.
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.
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.
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
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?
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.
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.
I am trying to do a program that will put a zero value on my b(1,2), b(1,3) and b(2,3) just like what I did on the a(2,1), a(3,1) and a(3,2).Can you check where did my program did go wrong? Thank you.
Yes, but I need the 2nd program to work. I am close to the exact program but it seems there's a hiccup. hope you could find it here.
This is my latest file.
There may be more elegant ways but a quick fix is to add the highlighted line to deal with the last column as well.
Note that the numeric evaluation suffers from numerical rounding errors and the like.
BTW, its always better not to use inline evaluations but rather B:=<program> and then B= or B-> in a separate region.
You may also consider turning your program into a function as this is more versatile.
!! Your algorithm would fail for a 2 x 3 matrix (n=2) and will not work OK for n>3.
Furthermore your algorithm (both for A and for B) suffers from a problem with choosing the pivot element so you may run into a division by zero now and then:
A better algorithm would run through the (first) column and find an appropriate non-zero element, swap the rows and then goes ahead.
You may want to read about that here
and in more detail here
Side note, If I wanted to do my program to be in it's Reduced Row Echelon Form (RREF),how do I do this without using the RREF function in mathcad prime?
Have obtained an algorithm from the web in Lua and transcribed it to Prime.
It is a Prime 7 file so will need to be saved back by someone to Prime 6 for you.
Here is a comparison of the inbuilt rref(a) compared to programmed f_rref(a)
"lead" is a counter incremented by one several times in the program.
"lead" is used to set a local variable "lm several times in the program.
"lead is used a an index into the matrix "M" as test for the while loop.
I wanted to program a Gauss-Seidel using this mathcad file. Can you help me out with my program? I can only do this with manually inputting the iterations and I wanted to input an error of not more than +/- 0.001 as its difference. Any tip on how to do it on this program? Thank you.