- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

# D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/hydro_source/return_mex_arguments.h File Reference

`#include "math.h"`
`#include "mex.h"`
`#include "string.h"`

Include dependency graph for return_mex_arguments.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions
void | store_state (double time, N_Vector state_at_t)
| Store state vector and time at each integration step.
void | return_args (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], ODE_data *f_dat)
| Return arguments to MATLAB.

## Detailed Description

Author:
  basile.graf@epfl.ch

This file contains functions for returning parameters to MATLAB

Definition in file return_mex_arguments.h.

## Function Documentation

void return_args | ( | int | nlhs,
|  | mxArray * | plhs[],
|  | int | nrhs,
|  | const mxArray * | prhs[],
|  | ODE_data * | f_dat
| ) |

  | Return arguments to MATLAB. Return the simulation results and simulation times (if asked for, see get_time()) and the cumulative number of integration steps performed (generally bigger than number of output points) Parameters:
  | nlhs | Number of left hand side arguments in the MATLAB prompt
  | *plhs[] | Array of pointers to the left hand side arguments from MATLAB prompt
  | nrhs | Number of right hand side arguments in the MATLAB prompt
  | *prhs[] | Array of pointers to the right hand side arguments from MATLAB prompt
  | *f_dat | ODE solver data struct
Definition at line 60 of file return_mex_arguments.cpp. References sout00, sout01, sout02, sout03, sout04, sout05, sout06, sout07, sout08, sout09, sout10, and sout11. Referenced by mexFunction().

void store_state | ( | double | time,
|  | N_Vector | state_at_t
| ) |

  | Store state vector and time at each integration step. If the programm has to return simulation results to MATLAB (see get_time()), the state vector and the time has to be stored at each integration step. They are stored in dynamic C++ vectors of type vector. Parameters:
  | time |
  | state_at_t | in the data format used by the SUNDIALS ODE solver CVODE
Definition at line 43 of file return_mex_arguments.cpp. References Ith, sout00, sout01, sout02, sout03, sout04, sout05, sout06, sout07, sout08, sout09, sout10, sout11, and timev. Referenced by solve_ODE().