# Algorithm to solve a system of two equations and a set of constraints

1 visualización (últimos 30 días)
Alejandro Fernández el 15 de Oct. de 2020
Respondida: Prudhvi Peddagoni el 19 de Oct. de 2020
Hello, I was wondering if anyone could implement an algorithm that could solve a system of equations with 4 unknowns (a,b,c,d) and two equations, to make it soluble a series of restrictions are added:
• The values of the four variables can only be powers of 10 from 1000 to 10000 of the following values, for example it could be 1200, 15000, 270000, etc.:
val = [1, 1.2 , 1.5, 1.8, 2.2 , 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2]
• It should always be put of initial condition that the variables a and d take the value 1000, and from there that it is found the solution that better approximates the result using these values.
As an example I leave here a possible system of equations.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (1)

Prudhvi Peddagoni el 19 de Oct. de 2020
Hi,
you can use solve function to do this. the documentation for this function and the examples can be found here.
Hope this helps.
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by