%% Select BLE Channel Indices Based on Type of Channel Selection Algorithm
% Create a blechannelselection System object, 'csa', to select a BLE channel index based on the channel selection algorithm, 'Algorithm #1'. View the corresponding applicable properties.

csa = bleChannelSelection

% Set the values of 'HopIncrement' to 7 and 'UsedChannels' to [0,2,24,6,10,14,26,30,34,36]. View the corresponding properties.

csa.HopIncrement = 7;
csa.UsedChannels = [0, 2, 24, 6, 10, 14, 26, 30, 34, 36]

% Select a BLE channel index from the corresponding system object using 'Algorithm #1'.

channelIndex = csa()

% Create another  blechannelselection System object, 'csa', this time to select a BLE channel index by specifying the type of channel selection algorithm as 'Algorithm #2'. View the corresponding applicable properties.

csa2 = bleChannelSelection("Algorithm",2);

% Change the values of 'AccessAddress' to '8E89BED6' and 'UsedChannels' to [9,10,21,22,23,33,34,35,36]. View the corresponding properties.

csa2.AccessAddress = '8E89BED6';
csa2.UsedChannels = [9, 10, 21, 22, 23, 33, 34, 35, 36]

% Select a BLE channel index from the corresponding system object using 'Algorithm #2'.

channelIndex2 = csa2()

% Copyright 2019 The MathWorks, Inc.