Click here to Skip to main content
15,913,160 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
I require to find all the solution of linear system of equations where no of variable are more than no of equations.

There can be more than one solution.

I need to do some calculation on all solutions.

Thanks in advance

For example H=[1 0 0 0 0 0
0 0 1 0 0 0 1
0 0 1 0 1 1
0 0 0 1 0 0]


b=[0
0
1
1]


X=[x1
x2
x3
x4
x5
x6


HX=b

If there are four possible solutions I want all of them.

Thanks




SQL
Guys ,Thanks for your well meaning advise but I am new to c code and have posted first time on a forum.Basicaliy I am a research scholar trying to implement a paper in matlab.I have implemented most part in Matlab but was struct in this linear function solving,where the no variables are more than the equations.
   I have solved for one solution but am required to find all possible solutions to calculate minimum weight.AS c code can be included in Matlab I am asking help for coding in just this single function.

Thanks
Posted
Updated 17-Sep-12 17:56pm
v4

1 solution

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
 
Share this answer
 
Comments
PRIYAOJAS 17-Sep-12 6:45am    
I tried but am struck
OriginalGriff 17-Sep-12 6:50am    
What did you try?
Where are you stuck?
sunandandutt 17-Sep-12 7:28am    
OriginalGriff- do not demoralise. we are here to provide solutions only.
[no name] 17-Sep-12 7:33am    
No we are not. We are here to help people that have a specific problem. We are not here to do other peoples homework for them, write their code for them or do their regular work for them.
sunandandutt 17-Sep-12 7:40am    
you mean to say her problem is not specific?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900