Borrar filtros
Borrar filtros

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

4 visualizaciones (últimos 30 días)
Richard
Richard el 30 de En. de 2014
Respondida: SooShiant el 20 de Feb. de 2014
I have one equation and two unknowns. How do I create a table of possible solutions?
  1 comentario
John D'Errico
John D'Errico el 20 de Feb. de 2014
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.

Iniciar sesión para comentar.

Respuestas (2)

SooShiant
SooShiant el 20 de Feb. de 2014
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 el 30 de En. de 2014
you have to define the support of the x,y , and you can infinite solutions

Categorías

Más información sobre Discrete Math en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by