If any of you know what it means for a matrix to be in row-echelon form, I'm trying to create some code to check if a matrix is in that form, and if not put it in that form. Any ideas?
If any of you know what it means for a matrix to be in row-echelon form, I'm trying to create some code to check if a matrix is in that form, and if not put it in that form. Any ideas?
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
What is the use of Row-Echelon form, Leeman? Is there one, or are you trying to make a program to do your math homework? Just curious.
Away.
Well, it's going to be a program that solves systems of equations. Yes, for my homework.
What I mean by "for my homework" is pre-calc homework lol. Not programming homework.
If all you want it for is your homework then do you have a graphing calculator. I know the TI-86 and TI-89 both can do what you ask. I own both and find the TI-86 easier to use when working with matrices.
James
Of course I could just do it with my calculator. Much more fun to make a program though.
reduced-echelon form:
1 x y
0 1 z
0 0 1
row-echelon form:Code:// begin program int matrix[3][3]; // to hold matrix bool echelon=TRUE; // fill matrix in here if(matrix[0][0]!=1 || matrix[1][0]!=0 || matrix[1][1]!=1 || matrix[2][0]!=0 || matrix[2][1]!=0 || matrix[2][2]!=1) echelon=FALSE; if(ecelon) cout>>"echelon"; else cout>>"not ecelon"; // end program
x y z
a b c
0 0 0
i'm not doing all your homework for you... just fill in the cout in the 'else' with code to put it in the lowest form if it's not already... but good luck with that...Code:// begin program int i; int matrix[3][3]; // to hold matrix bool echelon=TRUE; // fill matrix in here for(i=0;i<3;i++) { if(matrix[2][i]!=0) echelon=FALSE; } if(ecelon) cout>>"echelon"; else cout>>"not ecelon"; // end program
Last edited by major_small; 05-17-2003 at 10:08 PM.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT