problem finding the coordinates of point in stainer tree problem by brute force
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
jakaria babar
le 16 Juil 2019
Réponse apportée : Stephan
le 17 Juil 2019
hi
what's wrong with the coding. i want to find the value of 'a' and 'b' for which 'L' is minimum.
>> [m,a,b]=min_length(10:.01:40,5:.01:25)
m =45.7813
a = 40
b = 25
these are not the correct value of 'a' and 'b'.
thank you.
0 commentaires
Réponse acceptée
Stephan
le 17 Juil 2019
your if is ending 3 lines to early. No matter what happens, you get a = x(end) and b = y(end). the m you get is the last that fullfilled the relation L<M.
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!