Dear community, I want to develop a fermentation model with 4 ODEs, one of which contains variable y. A "repeated assignment", e. g. y=5x+5, contains variable x that has been measured each second. These data (columns with time and corresponding value x in each row) are recorded in the Excel file. Does anyone have any suggestion how to implement this in symbiology? Thank you very much in advance, Repeated assignment with measured variable Hi Tetiana, You can do this by creating a repeated assignment for x that calls a function to do linear interpolation of the reported experimental values of x. The steps would be: create a function, lets say myfunction, to do linear interplotion of experimentally measured values of x create a repeated assignment for x that calls this custom function, such as: x = myfunction(time). Please see this example for an example of this forcing function strategy. Here, the values of Plasma Ins Conc, Glu Prod, and Glu Appear Rate are controlled by repeated assignments that call such functions. If you type edit PlasmaInsulin in MATLAB command-line you can inspect an example external function for interpolation. Please note that we recommend that the inputs and outputs to custom functions used in SimBiology models to be dimensionless and that's the approach taken in the example I reference above. Fulden Thank you very much Fulden! I have a question to the first step. How can I do the linear interplotion from Excel and import the function in simbiology? I can create a function im Matlab and upload the Excel data, but I have no idea how to do it in Simbiology. Sorry, for the dumb question:) Hi Tetiana, you can call MATLAB functions directly from SimBiology model expressions. You only need to make sure that the function is on MATLAB path or in current directory. You don't need an import. Please let me know if this answers your question. Fulden Thank you! But should I import Excel data in Matlab? Sorry, I'm not very experienced yet 😔 You can import data from Excel to MATLAB using readtable. % Say you have file with name mydata.xlsx, with colums T for time points and X for x values. % You can bring it to MATLAB as a table: data = readtable('mydata.xlsx'); % Save this table in a mat file: save mymatfile.mat data You can then load this data in your custom function: function y = myfunction(time) persistent d % initialize data when time is 0 if time == 0 || isempty(d) d = coder.load('mymatfile.mat'); end y = interp1(d.data.T, d.data.X, real(time)); Please note that you could call readtable from the function directly too but that would not be compatible with code generation which SimBiology let you take advantag of. SimBiology lets you accelerate simulations by converting the model to compiled C code using code generation, which executes faster. Since the MATLAB function readtable is not supported for code generation, I'm not using that within this function. Instead I'm using coder.load to load data from a mat file. Dear Fulden, I’m very very grateful to you! It’s worked out:) repeated assignment