summaryrefslogtreecommitdiff
path: root/sci_gateway/cpp/sci_matrix.c
blob: cf217d69d8c245d25eb403548b3335afa52bdb6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

#include<Scierror.h>
#include<sciprint.h>
#include<api_scilab.h>
#include "localization.h"
#include "fun.h"
#include <stdio.h>
#include <math.h>

static const char fname[] = "octave_fun";

int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* opt, int nout, scilabVar* out)

{
double retval;
double* out1 = NULL;
   
if (nin != 0)
    {
        Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), fname, 2);
        return 1;
    }

if (nout != 1)
    {
        Scierror(77, _("%s: Wrong number of output argument(s): %d expected.\n"), fname, 1);
        return 1;
    }
		*out = scilab_createDoubleMatrix2d(env, 1, 1, 5);
    fun(&retval);
		printf("%f\n", retval); 
		*out1 = retval;
   	scilab_getDoubleArray(env, out[0], &out1);



    return 0;
}