Is there a search algorithm I can apply to a dataset that I do not have a specific F(x,y) function for?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Matthew
le 23 Jan 2018
Commenté : Walter Roberson
le 23 Jan 2018
Hello,
I am looking for the best search algorithm for the following set of data:
I have a set of temperature values T(x,y) which I want to find a minimum of; it is important to note that I do not have a specific function (such as T(x,y)= x^2+y^2), just the points. I haven't found a search function that works on raw data (without a function handle), but I'm a little out of my element so I may have misunderstood the documentation.
What I would like to do is to have the algorithm start at the maximum T value, then show the path it takes to the minimum T value. I want to be able to overlay the path on data for presentation. For what it's worth, the data is relatively well behaved, so there is a well defined global maximum and few peaks between the maximum and minimum.
Thank you for any direction you can offer,
Matt
Edit1: This does take place on a square grid.
0 commentaires
Réponse acceptée
Walter Roberson
le 23 Jan 2018
To get a path between min and max, first find out which nodes are min and max, and then create a graph() representation of the system and use shortestpath() to find the way between them.
A key bit here is that you have to decide which nodes are connected to which. You did not say that you have a grid of points, so we as onlookers cannot assume that nodes are connected in any particular manner: in what you have given so far, it is not clear that the path could not simply go from max to min in one angled step.
4 commentaires
Walter Roberson
le 23 Jan 2018
I think I posted code to construct an appropriate mesh about 4 or 5 months ago, but it would take me a while to find it.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!