find function with floating points number
Ältere Kommentare anzeigen
distances=[100.2545 120.6632;200.8588 220.4465]
points_id=[{'p1'} {'p2'};{'p3'} {'p4'}]
pointfind = @(d) points_id(find(distances == d));
p = pointfind(120.6632)
%it gives
p1 =
Empty cell array: 0-by-1
%this function only works with integers but I need to work with floating points number.
Akzeptierte Antwort
Weitere Antworten (1)
Alessandro
am 8 Mai 2014
0 Stimmen
1 Kommentar
sermet
am 8 Mai 2014
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!