%% Evaluate Multiple Tall Arrays
% Use gather with several inputs to simultaneously evaluate several tall arrays.
% Create a tall array from an in-memory array of random integers between 1 and 1000. Calculate the maximum and minimum values in each column.

A = tall(randi(1000,100,7))

%

b = min(A);
c = max(A);

%
% Use the results to determine the overall minimum and maximum values in the array. Collect the final result into memory.

[mnA,mxA] = gather(min(b),max(c));

%

valRange = [mnA mxA]

% Copyright 2012 The MathWorks, Inc.