~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to examples/mex-examples/mex-with-objects/mexfunction8.c

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "mex.h"
2
 
 
3
 
void mexfunction8(nlhs, plhs, nrhs, prhs)
4
 
     int nlhs, nrhs;
5
 
     mxArray *plhs[]; mxArray *prhs[];
6
 
{
7
 
  int ROWS=3;
8
 
  int rows;
9
 
  int columns;
10
 
  static char *STRINGS[3] ={"123456789",
11
 
                            "qwertyuiop",
12
 
                            "----------"};
13
 
  mxArray *array_ptr;
14
 
  array_ptr=mxCreateCharMatrixFromStrings(ROWS, STRINGS);
15
 
  rows=mxGetM(array_ptr);
16
 
  columns=mxGetN(array_ptr);
17
 
  mexPrintf("Rows %d; Columns %d\n", rows, columns);
18
 
  plhs[0]=array_ptr;
19
 
}  
20