%% Read Portion of Data from Variable
% Read and plot only a subset of the variable data starting from the location [25 17] until the end of each dimension.

startLoc = [25 17]; % Start location along each coordinate
count  = [Inf Inf]; % Read until the end of each dimension
peaksData  = ncread('example.nc','peaks',startLoc,count);
whos peaksData

% Plot the data.

surf(double(peaksData));
title('Peaks Data Starting at [25 17]');

% Copyright 2018 The MathWorks, Inc.