Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C GimmeCode Matlab
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
 

 

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 17-Sep-12 0:32am
Edited 17-Sep-12 17:56pm
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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!
  Permalink  
Comments
PRIYAOJAS at 17-Sep-12 6:45am
   
I tried but am struck
OriginalGriff at 17-Sep-12 6:50am
   
What did you try?
Where are you stuck?
sunandandutt at 17-Sep-12 7:28am
   
OriginalGriff- do not demoralise. we are here to provide solutions only.
Wes Aday at 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 at 17-Sep-12 7:40am
   
you mean to say her problem is not specific?
Wes Aday at 17-Sep-12 7:45am
   
No it is not specific. Where is the code that demonstrates his/her problem? Where is the description of the what the OP has tried to do? It's not even a very good description of what the OP wants to do. It's not even a question at all.
OriginalGriff at 17-Sep-12 8:04am
   
As Wes said - no we are not!
We are most definitely not here to "provide solutions" which get people grades they do not deserve, and do to peoples work for them.
We are here to help, to assist, and to educate.
PRIYAOJAS at 17-Sep-12 23:55pm
   
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

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 841
1 OriginalGriff 245
2 Volynsky Alex 205
3 Kishore Pogaru 140
4 Magic Wonder 129
0 OriginalGriff 5,705
1 Sergey Alexandrovich Kryukov 4,763
2 CPallini 4,570
3 George Jonsson 3,142
4 Gihan Liyanage 2,450


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 17 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100