simbiology problem with ode solvers

2 views (last 30 days)
Hi, I'm trying to create a pk/pd project in simbiology. Since I'm new to Simbiology I wanted to run a very basic PK model and I realized that I can not simulate my model no matter I do. I keep getting "Test of generated MATLAB function failed" Then I tried running some of the example projects and I encountered the message there as well. I also tried running the code from the command line instead of desktop, but nothing changed. the error message for the example project gprotein was as follows: ---------------------------------------------------------------------- Test of generated MATLAB function failed.
Caused by: Undefined variable "coder" or class "coder.extrinsic".
Error using SBCompiler.SimulationObject/simulate --> Error reported from ODE Compilation: Error using Generator.testMFile (line 587) Test of generated MATLAB function failed.
Error in sbiosimulate (line 143) [t x] = simobj.simulate(mobj, cs, variants, doses); -------------------------------------------------------------------
I realized that I can not even export the model as equations since I run into the previous error. "Test of generated MATLAB function failed"
Can someone help me fix this problem and make simulations possible?
Thanks.

Accepted Answer

Arthur Goldsipe
Arthur Goldsipe on 3 Oct 2014
Hi,
This problem occurs when SimBiology cannot find a necessary MATLAB function, coder.extrinsic. See if you have a file named extrinsic.m located at [matlab]/toolbox/shared/coder/coder/+coder/, where [matlab] should be replaced with your MATLAB installation directory. If the file is missing, then you have an installation problem, and you should reinstall MATLAB. If the file is there, then there is a problem with your MATLAB path (perhaps caused by a startup script that changed the path). You can restore the default MATLAB path by running the command restoredefaultpath. Hopefully, one of these two suggestions will solve your problem.
  1 Comment
Vinicius Skrobot
Vinicius Skrobot on 17 Nov 2016
The 'restoredefaultpath' solved my problem in a similar situation. Thank you!!

Sign in to comment.

More Answers (1)

qprime
qprime on 3 Oct 2014
it worked! thanks a lot!

Communities

More Answers in the  SimBiology Community

Categories

Find more on Scan Parameter Ranges in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!