summaryrefslogtreecommitdiff
path: root/sci_gateway
diff options
context:
space:
mode:
Diffstat (limited to 'sci_gateway')
-rwxr-xr-xsci_gateway/cpp/libscilab_toolbox.sobin16528 -> 16528 bytes
-rw-r--r--sci_gateway/cpp/sci_matrix.cpp16
2 files changed, 12 insertions, 4 deletions
diff --git a/sci_gateway/cpp/libscilab_toolbox.so b/sci_gateway/cpp/libscilab_toolbox.so
index ed9057f..9cf2138 100755
--- a/sci_gateway/cpp/libscilab_toolbox.so
+++ b/sci_gateway/cpp/libscilab_toolbox.so
Binary files differ
diff --git a/sci_gateway/cpp/sci_matrix.cpp b/sci_gateway/cpp/sci_matrix.cpp
index ca147a7..aa45bed 100644
--- a/sci_gateway/cpp/sci_matrix.cpp
+++ b/sci_gateway/cpp/sci_matrix.cpp
@@ -14,8 +14,10 @@ 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* out1 = NULL;
-
+ double* out1 = NULL;
+ int n=5;
+ double ar[n];
+
if (nin != 0)
{
Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), fname, 2);
@@ -27,13 +29,19 @@ 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, 0);
+
+ fun(ar, n);
+ *out = scilab_createDoubleMatrix2d(env, n, 1, 0);
//double retval = fun();
//printf("%f\n", retval);
//*out1 = retval;
scilab_getDoubleArray(env, out[0], &out1);
- out1[0]=fun();
+ //out1[0]=fun();
+ for(int i=0; i<n; i++)
+ {
+ out1[i] = ar[i];//.float_value();
+ }
return 0;