MATLAB Answers

will99
0

Using nearest functiont?

Asked by will99
on 19 Apr 2019
Latest activity Commented on by Walter Roberson
on 19 Apr 2019
I have this huge matrix 500 by 500 I want to use nearest to find the 25 values that are nearest to X node
I did this but I'm not sure if it is correct when I displayed n I got more than 10 values
G= graph(A);
X= 238;
n = nearest(G,X,25);

  1 Comment

As outside observers, we have no reason to expect that there would be 10 or fewer nodes within distance 25 of node 238.

Sign in to comment.

Tags

Products


Release

R2019a

0 Answers