1,105,380 Community Members

solving linear equations

Member Avatar
krissmwa05
Newbie Poster
3 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-2
 

you will write a program to solve linear equations given in upper triangular form. There are N equations, and N unknowns. This is equavalent to the following matrix multiplication [A][X]=[B], where A is a square matrix (N by N), X and B are vectors with size N.
Back Substitution:
First, find the last unknown (Xn ) in the last equation.
Then substitute its value in the equation just above it and find Xn-1 .
Repeat back substitution until all X’s are found.
Your program should dynamically allocate memory for the data structures.

please help me with my homework because i have failed to write anything.

Member Avatar
rubberman
Senior Poster
3,989 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 500 [?]
Skill Endorsements: 87 [?]
 
0
 

We don't do your homework for you - don't ask us to help you cheat! Make an effort and we will help you correct coding problems. You might start by reading your linear algebra text book...

Member Avatar
krissmwa05
Newbie Poster
3 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-1
 

i guess i am so new to this and most probably i signed up before knowing what really happens round here.My reading of linear Algebra is not going to help me write the code.Rubberman not everyone is good at programming and that's why some of us join such groups and that's why i am asking for help from anyone who would feel free to help me cheat as you call it.I am not ashamed to say that i don't know what to do and that's why i posted this.

Member Avatar
deceptikon
Eternally Awesome
4,675 posts since Jan 2012
Reputation Points: 1,341 [?]
Q&As Helped to Solve: 681 [?]
Skill Endorsements: 104 [?]
Administrator
Featured
 
0
 

What kind of help are you expecting? As mentioned, we're not going to solve the problem for your or write the code for you. If you ask specific questions you'll get specific answers, but if you ask for "help" and just post an assignment you'll get no help at all.

Member Avatar
Caeon
Light Poster
36 posts since Oct 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
0
 

But you can't write your code if you don't understand your equations that you'll need to utilize.

From first glance, you might want to use some sort of recurssive functions. I would look at previous problems you've recently done in class. See how you dynamically allocated memory for the data structures in the past problems and build off it.

Focus on doing it once and then expanding it to fit the rest of the criteria.

Member Avatar
krissmwa05
Newbie Poster
3 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
void solve1(int *A[],int N,int *B,int *X){


  for(int i=N-1;i>=0;i--){
  for(int j=N-1;j>i;j--){
    X[i]=B[i]-A[i][j]*B[j];

    i am now supposed to use the PARAMETER METHOD: The resulting X values will be sent from function to the main thru the parameter passing mechanism.How would i do that btw N=4. 
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: