1 #!/usr/bin/octave --silent
6 plist = struct('id', {'4001' '4002' '1' '2'},...
7 'x', {0 1000 100 500},...
8 'y', {0 1000 100 500},...
12 distance(plist, 4001, 1)
13 distance(plist, 4001, [1 2; 3 4])
14 distance(plist, [4001 4002], [1 2])
15 distance(plist, '4001', '1')
16 distance(plist, '4001', {'1' '2'; '3' '4'})
17 distance(plist, {'4001' '4002'}, {'1' '2'})
18 distance(plist, {'4001' '4002'}, [1 2])
19 distance(plist, [4001 4002], {'1' '2'})