![]() ![]() BRAHMS
User Guide » Developing Processes » Quick Start » 1258 » Taking Parameters
This documentation is offline - click here to go online
Index | Search: Go online to use Search
| ||
OverviewThe Process you've created doesn't take any parameters, so we can't control how it behaves on any particular execution. Let's add a parameter or two, and then we'll have a process that's beginning to look useful. Passing parametersModify your test script as follows, to pass a couple of parameters to the process. M Source Code (against 995)
% add process
state
state state fS You can go ahead and run this immediately, without modifying your process. Nothing will be different - the process has been presented these parameters, but it has ignored them, and this is quite acceptable in BRAHMS. Reading parametersNow modify your source file to actually read these parameters: the process state is passed in as Here, we extract the parameter from the M Source Code (against 1258)
% initialise a state
persist Also add a modification to use the passed value of M Source Code (against 1258)
% run dynamics
tau fS This should produce a plot like the following. Note that both the initial membrane potential, and the time constant of the decay, are now respecting the values we set in the test script. ![]() Where do I go from here?You can parametrize your process as much as you like, and pass in any Matlab structure of parameters. Here, we've seen only a couple of Using 1258, you will explore your parameters simply through the Matlab associative array interface, since they have been converted to this form from the underlying DataML XML node. This is, therefore, pretty trivial. What you pipe in in your Matlab system script comes out in your Matlab process. |
||
This is a documentation page for the BRAHMS Modular Execution (Simulation) Framework. For details of licensing and distribution, please click here. To advise of an error or omission, please click here. |