function [xradiusMKP,ypruhybMKP,xradiusVZTAHY,ypruhybVZTAHY1,ypruhybVZTAHY2] = importfile6(workbookFile,sheetName,startRow,endRow)
%IMPORTFILE1 Import data from a spreadsheet
%   [xradiusMKP,ypruhybMKP,xradiusVZTAHY,ypruhybVZTAHY1,ypruhybVZTAHY2] =
%   IMPORTFILE1(FILE) reads data from the first worksheet in the Microsoft
%   Excel spreadsheet file named FILE and returns the data as column
%   vectors.
%
%   [xradiusMKP,ypruhybMKP,xradiusVZTAHY,ypruhybVZTAHY1,ypruhybVZTAHY2] =
%   IMPORTFILE1(FILE,SHEET) reads from the specified worksheet.
%
%   [xradiusMKP,ypruhybMKP,xradiusVZTAHY,ypruhybVZTAHY1,ypruhybVZTAHY2] =
%   IMPORTFILE1(FILE,SHEET,STARTROW,ENDROW) reads from the specified
%   worksheet for the specified row interval(s). Specify STARTROW and
%   ENDROW as a pair of scalars or vectors of matching size for
%   dis-contiguous row intervals. To read to the end of the file specify an
%   ENDROW of inf.
%
%	Non-numeric cells are replaced with: NaN
%
% Example:
%   [xradiusMKP,ypruhybMKP,xradiusVZTAHY,ypruhybVZTAHY1,ypruhybVZTAHY2] = importfile1('EXCEL_grafy_posuvu.xlsx','List1',4,203);
%
%   See also XLSREAD.

% Auto-generated by MATLAB on 2018/03/21 14:00:39

%% Input handling

% If no sheet is specified, read first sheet
if nargin == 1 || isempty(sheetName)
    sheetName = 1;
end

% If row start and end points are not specified, define defaults
if nargin <= 3
    startRow = 4;
    endRow = 203;
end

%% Import the data
[~, ~, raw] = xlsread(workbookFile, sheetName, sprintf('Q%d:U%d',startRow(1),endRow(1)));
for block=2:length(startRow)
    [~, ~, tmpRawBlock] = xlsread(workbookFile, sheetName, sprintf('Q%d:U%d',startRow(block),endRow(block)));
    raw = [raw;tmpRawBlock]; %#ok<AGROW>
end
raw(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),raw)) = {''};

%% Replace non-numeric cells with NaN
R = cellfun(@(x) ~isnumeric(x) && ~islogical(x),raw); % Find non-numeric cells
raw(R) = {NaN}; % Replace non-numeric cells

%% Create output variable
I = cellfun(@(x) ischar(x), raw);
raw(I) = {NaN};
data = reshape([raw{:}],size(raw));

%% Allocate imported array to column variable names
xradiusMKP = data(:,1);
ypruhybMKP = data(:,2);
xradiusVZTAHY = data(:,3);
ypruhybVZTAHY1 = data(:,4);
ypruhybVZTAHY2 = data(:,5);

