function [M, colr] = showCoverage(fname,nr,nc,maxColor)
% Use a color map to show the coverage of the floor done by the robot
% during its trip--trip data is stored in the file named by fname.  The
% color map is nr rows by nc columns and the tile (subregion) visited most 
% frequently has the color maxColor.  Return the cell array that contains
% the color data (colr) as well as the 2-d histogram data (matrix M).

clc
[pos,minX,maxX,minY,maxY,timeString]= getData(fname);

% Show the start time of the trip (from the data) in Command Window
% ** Write your code here **



% Compute 2-d histogram data and store in matrix M
% ** Write your code here **




% Dummy assignment below:
M= [2 5 6;...
    0 1 2];
% Dummy assignment above.  Replace it with your code.


% Draw color map
colr= show2dData(M,maxColor);


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [pos,minX,maxX,minY,maxY,timeString] = getData(fname)
% Read, compute, and return data from the file named by fname.
% pos is a 1-dimensional array of Position structures;
%   each Position structure has the fields x, y, and ang.
% minX is the smallest x-coordinate value (numeric scalar).
% maxX is the biggest x-coordinate value (numeric scalar).
% minY is the smallest y-coordinate value (numeric scalar).
% maxY is the biggest y-coordinate value (numeric scalar).
% timeString is the start time of the trip; a string of the form hh:mm:ss.

% Dummy assignments below:
pos=[]; minX=0; maxX=1; minY=0; maxY=1; timeString='';
% Dummy assignments above.  Replace them with your code.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function Position = makePosition(x,y,angle)
% Position is a structure such that 
%   Position.x is assigned the value x,
%   Position.y is assigned the value y, and
%   Position.ang is assigned the value angle.

% Dummy assignment below:
Position= [];
% Dummy assignment above.  Replace it with your code.
