One equation, two unknowns. How do I create a table of possible solutions?

I have one equation and two unknowns. How do I create a table of possible solutions?

댓글 수: 1

Infinitely many solutions, so an infinitely long table. You will be better off learning how to parameterize the solutions in a simple formula. Essentially learn the mathematics of how to solve your problem.

댓글을 달려면 로그인하십시오.

답변 (2개)

Here is a simple example which you can change the equation and range and solve yours. The equation is 12x+9y+7z-60=0 where x,y,z are integers varies 0 to 10:
x=[0:1:10];
y=[0:1:10];
z=[0:1:10];
[X,Y,Z]=ndgrid(x,y,z);
F=12.*X+9.*Y+7.*Z-60;
idx=find(F==0);
[X(idx(:)),Y(idx(:)),Z(idx(:))];
Equations of this type are known as Diophantine equations.
Youssef  Khmou
Youssef Khmou 2014년 1월 30일

0 개 추천

you have to define the support of the x,y , and you can infinite solutions

카테고리

도움말 센터 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

질문:

2014년 1월 30일

답변:

2014년 2월 20일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by