D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/hydro_source/get_mex_arguments.h File Reference

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

Go to the source code of this file.

Defines

#define PARAMNUM   10
#define STATENUM   12

Functions

void initParameters (struct parameters *P)
 Initialize integrator options to default.
void get_Parameters (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], struct parameters *P)
 Get integrator options parameters From MATLAB.
double * get_state (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
 Get the initial ($ t=0 $) state vector ($ \vec{q} $) from MATLAB.
void delete_state (double *state)
 Free state vector ($ \vec{q} $) memory.
char * get_flag (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
 Get flag from MATLAB (not used).
void get_joystick_parameters (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], struct joy_parameters *jP)
 Get joystick options parameters From MATLAB.
void get_time (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[], ODE_data *f_dat)
 Get time parameter from MATLAB.


Detailed Description

Author:
basile.graf@epfl.ch
This file contains functions for getting parameters from MATLAB

Definition in file get_mex_arguments.h.


Define Documentation

#define PARAMNUM   10
 

Definition at line 13 of file get_mex_arguments.h.

Referenced by initParameters().

#define STATENUM   12
 

Definition at line 14 of file get_mex_arguments.h.

Referenced by initParameters().


Function Documentation

void delete_state double *  state  ) 
 

Free state vector ($ \vec{q} $) memory.

Free the memory alocated by get_state()

Parameters:
*state pointer to the double[12] state array ($ \vec{q} $)

Definition at line 175 of file get_mex_arguments.cpp.

Referenced by mexFunction().

char* get_flag int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[]
 

Get flag from MATLAB (not used).

Get the flag parameter from MATLAB (NOT USED)

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

Definition at line 182 of file get_mex_arguments.cpp.

void get_joystick_parameters int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[],
struct joy_parameters jP
 

Get joystick options parameters From MATLAB.

Get joystick settings from MATLAB.
In the MATLAB prompt, a struct jP can be passed containing some or all of the followings (if not set, default is used):
jP.dirX: Positive direction for axis X
jP.dirY: Positive direction for axis Y
jP.dirZ: Positive direction for axis Z
jP.dirR: Positive direction for axis R
jP.doX: Use joystick control or keyboard for axis X
jP.doY: Use joystick control or keyboard for axis Y
jP.doZ: Use joystick control or keyboard for axis Z
jP.doR: Use joystick control or keyboard for axis R

Definition at line 213 of file get_mex_arguments.cpp.

References joy_parameters::dirR, joy_parameters::dirX, joy_parameters::dirY, joy_parameters::dirZ, joy_parameters::doR, joy_parameters::doX, joy_parameters::doY, and joy_parameters::doZ.

Referenced by mexFunction().

void get_Parameters int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[],
struct parameters P
 

Get integrator options parameters From MATLAB.

Get solver settings from MATLAB.
In the MATLAB prompt, a struct P can (must) be passed containing some or all of the followings (if not set, default is used, exept for param):
P.abstol: Absolute tolerance (scalar (all the same) or vector of length 12)
P.reltol: Relative tolerance (scalar)
P.param : Parameters vector (diverse), MUST be given, see MATLAB model...

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
*P pointer to the parameters struct (in C code)

Definition at line 49 of file get_mex_arguments.cpp.

References parameters::reltol.

Referenced by mexFunction().

double* get_state int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[]
 

Get the initial ($ t=0 $) state vector ($ \vec{q} $) from MATLAB.

Copy $ \vec{q} $ at $ t=0 $ from MATLAB

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
Returns:
pointer to the double[12] state array ($ \vec{q} $)

Definition at line 159 of file get_mex_arguments.cpp.

Referenced by mexFunction().

void get_time int  nlhs,
mxArray *  plhs[],
int  nrhs,
const mxArray *  prhs[],
ODE_data f_dat
 

Get time parameter from MATLAB.

Meaning:
$ 0 $: Simulate indefinitely without returning anything to MATLAB $ t_{end} $: Simulate from $ t=0 $ to $ t=t_{end} $ and return simulation results to MATLAB

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 293 of file get_mex_arguments.cpp.

References ODE_data::time_param.

Referenced by mexFunction().

void initParameters struct parameters P  ) 
 

Initialize integrator options to default.

Initializes P.reltol and P.abstol to default values.
The P.param array is set to zeros (not a valid default for meaningfull simulation, just to avoid any crash!!!)

Parameters:
*P pointer to the parameters struct

Definition at line 23 of file get_mex_arguments.cpp.

References parameters::abstol, parameters::param, PARAMNUM, parameters::reltol, and STATENUM.

Referenced by mexFunction().


Generated on Fri Jun 9 19:10:30 2006 for hydroMex3 by  doxygen 1.4.6-NO