| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → SimBiology |
| Contents | Index |
| Learn more about SimBiology |
newSimDataObj =
resample(simDataObj)
newSimDataObj =
resample(simDataObj, timevector)
newSimDataObj =
resample(simDataObj, timevector, method)
| newSimDataObj | Resampled SimData object array. |
| simDataObj | SimData object array that you want to resample. |
| timevector | Real numeric array of time points onto which you want to resample the data. |
| method | Method to use during resampling. Can be one of the following: |
newSimDataObj = resample(simDataObj) resamples the simulation data contained in every element of the SimData object array simDataObj onto a common time vector, producing a new SimData array newSimDataObj. By default, the common time vector is taken from the element of simDataObj with the earliest stopping time.
newSimDataObj = resample(simDataObj, timevector) resamples the SimData array simDataObj onto the time vector timevector. timevector must either be a real numeric array or the empty array []. If you use an empty array, resample uses the default time vector as described above.
newSimDataObj = resample(simDataObj, timevector, method) uses the interpolation method specified in method.
If the specified timevector includes time points outside the time interval encompassed by one or more SimData objects in simDataObj, the resampling will involve extrapolation and you will see a warning. See the help for the MATLAB function corresponding to the interpolation method in use for information on how the function performs the extrapolation.
The project file, radiodecay.sbproj contains a model stored in a variable called m1. Load m1 into the MATLAB workspace.
sbioloadproject('radiodecay');
simDataObj = sbiosimulate(m1);
Resample the data.
newSimDataObj = resample(simDataObj, [1:5], 'linear');
The project file, radiodecay.sbproj, contains a model stored in a variable called m1. Load m1 into the MATLAB workspace.
sbioloadproject('radiodecay');
Change the solver to use during the simulation and perform an ensemble run.
csObj = getconfigset(m1); set(csObj, 'SolverType', 'ssa'); simDataObj = sbioensemblerun(m1, 10);
Interpolate the time steps.
newSimDataObj = resample(simDataObj, [1:10], 'linear');
View the time steps in the SimData object arrays.
newSimDataObj(1).Time simDataObj(1).Time
sbioensemblerun, sbioensemblestats, sbiosimulate, SimData object
MATLAB functions interp1, interp1q

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |