The 'VariableNamesLine' property can be used to specify this. Please refer to the example snippet below.
%Import the options of the csv file
opts=detectImportOptions('sample.csv');
%Defines the row location of channel variable name
opts.VariableNamesLine = 4;
%Specifies that the data is comma seperated
opts.Delimiter =','; %Specifies that the data is comma seperated
%Read the table
t = readtable('sample.csv',opts, 'ReadVariableNames', true);
As mentioned in the link below, the properties 'VariableNamesRange' and 'VariableNamesLine' can be specified only if the 'ReadVariableNames' argument is set to 'true'. Refer to the second subsection of 'Name-Value Pair Arguments' to learn more.
Best Answer