does anybody please explain how to use 'tomlab' in Simbiology?
Show older comments
Hello, does anybody please explain how to use 'tomlab' in Simbiology? previously I used sundial, ode15s etc. Now I want to use tomlab instead of those.
Thanks in advance.
Emran
Accepted Answer
More Answers (1)
Arthur Goldsipe
on 20 Sep 2012
0 votes
Hi Emran,
TOMLAB and SimBiology are two separate products and are not integrated. Furthermore, TOMLAB is used for optimizing some objective function, while the SimBiology solvers ode15s and sundials are used for solving ordinary differential equations. Therefore, it does not really make sense to replace sundials with TOMLAB.
Perhaps you mean that you want to use TOMLAB for optimization of a SimBiology model? For example, you might want to determine the set of model parameters that best fit some experimental data. You should be able to do this by writing your own objective function to pass to TOMLAB. Here's a brief outline of what that function might look like:
- Accept parameter values as inputs
- Apply these parameter values to your SimBiology model
- Set the OutputTimes of the model's configset to the experimental times
- Simulate your model
- Calculate the sum of the squares of the errors (the difference between simulated and measured results)
- Return this sum as the output of the function
-Arthur
4 Comments
Arthur Goldsipe
on 21 Sep 2012
Hi Emran
Let me reiterate... SNOPT and NPSOL cannot replace ode15s or sundials. These functions have different purposes. ode15s and sundials solve a set of ordinary differential equations. SNOPT and NPSOL are used to minimize an objective function. Just like you can't use sqrt in place of sin, you can't use SNOPT in place of ode15s.
-Arthur
protein
on 21 Sep 2012
Arthur Goldsipe
on 23 Sep 2012
Edited: Arthur Goldsipe
on 24 Sep 2012
Hi Emran,
SimBiology currently only allows you to set the SolverType to one of the built-in solvers (as of R2012b, that includes 'ode15s', 'ode23t', 'ode45', 'sundials', 'ssa', 'expltau', and 'impltau'):
-Arthur
Categories
Find more on Extend Modeling Environment in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!