setTable(ScheduleDose,RepeatDose)
Set dosing information from table to dose object
Syntax
setTable(doseObj,tbl)
Description
setTable(
sets
the dosing data from a table doseObj
,tbl
)tbl
to a dose object doseObj
.
Input Arguments
doseObj
— Dose object
ScheduleDose
object | RepeatDose
object | array of dose objects
Dose object, specified as a ScheduleDose
object
or RepeatDose object
or
array of these objects.
tbl
— Dosing data
table | cell array of tables
Dosing data, specified as a table or cell array of tables. If doseObj
is
an array of dose objects, then tbl
must be a
cell array of tables of the same size as doseObj
.
If doseObj
is a ScheduleDose
object, tbl
must
have 2 or 3 variables (columns) representing dose time, amount, and
rate (optional). The variable names (tbl.Properties.VariableNames
)
must be 'Time'
, 'Amount'
, and 'Rate'
(optional),
respectively.
If doseObj
is a RepeatDose
object,
tbl
must have only one row with 4 or 5 variables
(columns) representing dose start time, amount, interval, repeat count, and
rate (optional). The variable names
(tbl.Properties.VariableNames
) must be
'StartTime'
, 'Amount'
,
'Interval'
, 'RepeatCount'
, and
'Rate'
(optional), respectively. The value of each
variable can be a numeric scalar or the name of a parameter (if the property
is parameterized).
The units of tbl
variables (tbl.Properties.VariableUnits
),
if any, are copied over to the corresponding property units of doseObj
.
Examples
Set a Table of Dosing Data to a RepeatDose Object
Create a table containing dose start time, amount, interval, repeat count, and rate.
StartTime = 5; Amount = 500; Interval = 1; RepeatCount = 3; Rate = 1; tbl = table(StartTime,Amount,Interval,RepeatCount,Rate);
Create a RepeatDose
object, and set the dosing information from the table.
rdose = sbiodose('rdose','repeat'); setTable(rdose,tbl);
Set a Table of Dosing Data to a ScheduleDose Object
Create a table containing dose time and amount.
Time = [1 2 3 4 5]'; Amount = [10 15 20 25 30]'; tbl = table(Time,Amount);
Create a ScheduleDose
object, and set
the dosing information from the table.
sdose = sbiodose('sdose','schedule'); setTable(sdose,tbl);
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);
Version History
Introduced in R2014a
See Also
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)