-
1 Comment
DHARMASETYA dharmasetya
on 31 Jul 2017
function [index1, index2] = nearestNumbers(A)
s=[1,1,Inf];
for i = 1:length(A)-1
for j= 1:length(A)-i
s1=[i,i+j,abs(A(i)-A(i+j))];
if s1(3)
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!