fmex2.c File Reference

#include <stdio.h>
#include "mex.h"
#include "lib/pipo.h"

Include dependency graph for fmex2.c:

Go to the source code of this file.

Functions

void mexFunction (int nlhs, plhs, int nrhs, prhs)


Function Documentation

void mexFunction ( int  nlhs,
plhs  ,
int  nrhs,
prhs   
)

Definition at line 5 of file fmex2.c.

References A, bar(), m, mexErrMsgTxt(), mexFunction, mxGetM(), mxGetN(), mxGetPr(), mxIsNumeric(), and n.

00008 {
00009   Matrix *ptrA; 
00010     double *A;
00011     int m,n;
00012     if (nrhs != 1) mexErrMsgTxt("This function requires 1 input!");
00013     if (nlhs > 1) mexErrMsgTxt("This function requires at most 1 output !");
00014     ptrA = prhs[0];
00015     if (! mxIsNumeric(prhs[0])) mexErrMsgTxt("First argument must be numeric matrix.");
00016     m = mxGetM(ptrA);n = mxGetN(ptrA);
00017     A = mxGetPr(ptrA);
00018     A[0] = bar( (int) A[0]); 
00019     plhs[0]=prhs[0];
00020 }  

Here is the call graph for this function:


Generated on Sun Mar 4 16:10:28 2007 for Scilab [trunk] by  doxygen 1.5.1