Hello,
Hope I am not asking too many questions. Here is one more. I want to do some user-defined calculation in differential equation system. Here is an example: calculate observed Cmax and model predicted Cmax
Originally, I have some code:
CC=DTA(7)
IF CC>Cm_OB THEN
Cm_OB=CC
Cm_Mod=Z(1)/Vc
ENDIF
DTA(7) is the column 7, where the concentration data is. After the program reads through all the data, Cm_OB is supposed to give me observed Cmax and Cm_Mod gives me the model predicted Concentration at the same time as the observd Cmax occurs. However I found Cm_Mod was not at the same time as the Cm_OB, which is assigned by CC.
I guess what happens is when CC reads a record, say at observed time 0.5 hour, the differential system has to start from zero. When Cm_OB=CC is executed, the system is still at somewhere between 0 and 0.5 hour, so Cm_Mod is the model predicted concentration sometime earlier than 0.5 hour.
My question is how I can synchronize Cm_OB and Cm_Mod. Thanks.
Jun