I am facing the following problem: how to pass external parameters to the @mymodel function used in the nlmefitsa function? (see below for specifications)
X is a 100 x 1 vector with time points (1:10) for 10 subjects X is a 100 x 1 vector with measured concentration for 10 subjects
The mymdoel fucntion to be passed to the nlmefitsa solves a differential equation trough the ode45. Anyway I need to pass the intial values "xin" (each individual has a different starting value) to teh ode45 and moreover I need to pass also the matrix "external" which contains data (NOT to be fitted) nedeed to the model. As I have 10 subjects I have 10 different "xin" vectors and matrices "external" to be passed through the nlmefitsa to mymodelfun. How to pass this to nlmfitsa and how to tell him wihcih one to use?
Summarizing the problem is how to properly write the model function to be passed to nlmfitsa
I have tried everything I could think off but I am stuck. Does anybody have an idea? Or, is this possible to do?