Finding the nearest value to a specifics numbers in a table
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
Adam Danz
el 22 de Oct. de 2020
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.
Respuestas (0)
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!