%% Set an Array of Dosing Tables to an Array of Dose Objects
% Create a table containing dose time and amount.

Time = [1 2 3 4 5]';
Amount = [10 15 20 25 30]';
tbl1 = table(Time,Amount);

%
% Create a table containing dose start time, amount, interval, repeat count, and rate.

StartTime = 5;
Amount = 500;
Interval = 1;
RepeatCount = 3;
Rate = 1; 
tbl2 = table(StartTime,Amount,Interval,RepeatCount,Rate);

%
% Create a cell array of dose tables.

tblArray = {tbl1,tbl2};

%
% Create ScheduleDose and RepeatDose objects

sdose = sbiodose('sdose','schedule');
rdose = sbiodose('rdose','repeat');
doseArray = [sdose,rdose];

%
% Set the cell array of dose tables to dose objects.

setTable(doseArray,tblArray);

% Copyright 2012 The MathWorks, Inc.