Finding the nearest value to a specifics numbers in a table

Hi, I have a table with dimensions of metal profiles and I programmed the design of metal pillars using genetic algorithm. So, the genetic algorithm finds the effective values of profile dimensions, but the dimensions found are not in the table. So, I want to find the profile with dimensions closer to the dimensions found by the algorithm, using the table.

1 comentario

If the differences are small, you could use LIA = ismembertol(A,B,tol) which identfies the value in A that are within tolerance (tol) to B.
Otherwise you could use a combination of abs(), min() and subtraction to find the values with the smallest difference.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Preguntada:

el 22 de Oct. de 2020

Comentada:

el 22 de Oct. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by