Skip to content

Instantly share code, notes, and snippets.

@ppizarror
Created October 1, 2016 19:57
Show Gist options
  • Save ppizarror/6d2fec2663ff60dc767b600658d3f0bb to your computer and use it in GitHub Desktop.
Save ppizarror/6d2fec2663ff60dc767b600658d3f0bb to your computer and use it in GitHub Desktop.
Elige un punto random de la lista de puntos
function point = choice_random( matrix, value )
%CHOICE_RANDOM_POINT Elige un valor random de los puntos (i,j) para los
%cuales matrix(i,j)=value
p = find_coordinates(matrix, value);
l = size(p,1);
r = randi([1 l],1,1);
point = p{r};
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment