in = [rand(1,15);rand(1,15)];
differences(in)
function [out] = differences(in)
%This function allows an array input and the differences between the array
i=1;
while (i<size(in,1))
out(i,:)= in(i+1,:)-in(i,:);
i=i+1;
end
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!