Please help with this
조회 수: 4 (최근 30일)
이전 댓글 표시
hi i need help writing a code that will allow the user to choose which of each of the intersections the user wants to solve for. these are the equations:
1: 100 + 200 = f1 + f3 or f1 + f3 = 300 (1)
2: 300 + f1 = f2 + f4 or −f1 + f2 + f4 = 300 (2)
3: f5 + f2 = 100 +500 or f2 + f5 = 600 (3)
4: f3 + f6 = 100 +300 or f3 + f6 = 400 (4)
5: f4 +f7 = f6 +200 or f4 − f6 + f7 = 200 (5)
6: 200 + 400 = f5 + f7 or f5 +f7 = 600 (6)
댓글 수: 2
Roger Stafford
2013년 12월 17일
Victor, you have seven unknowns and only six equations, so even if you use all six equations, they do not uniquely determine a solution - that is, there will be an infinite continuum of solutions. You need one more equation before you can obtain a unique solution.
답변 (2개)
Walter Roberson
2013년 12월 17일
댓글 수: 1
Walter Roberson
2013년 12월 18일
As I read it, you need to allow the user to indicate a list of flows (each f1 to f7) and corresponding traffic volumes. Then, list entered, analyze to see whether the user has given enough information to solve the flows exactly; if not, say so and go back to the beginning. If the user gave too much information or gave flow measurements that make the whole system impossible, then say so and go back to the beginning. If the user gave just the right amount of information and it is not contradictory, spit out the list of all of the traffic flows; and then go back to the beginning.
Roger Stafford
2013년 12월 18일
I will give you one more hint on your problem, Victor. The part of the problem statement that says " according to the dimension and rank of the matrix " is an important indication of how you should proceed in writing your requested program. You need to figure out what matrix they are referring to and write your program to proceed accordingly.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Software Development Tools에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!