[Scilab-users] How to link a static library

2017-11-06 Thread Shamika Mohanan
Hello,

I'm building a toolbox where I have to link a static library (.a file).

I'm able to build the toolbox using *exec builder.sce*.

I have the following line in the .start file

*link(lib_path + "/liboctave.a");*

When I load the toolbox using *exec loader.sce*, I get the error

*link: The shared archive was not loaded: liboctave.a: invalid ELF header*

If I change it to* link(lib_path + "/liboctave");*, I get the error *:
cannot open shared object file: No such file or directory*

How do I use link() to link a static library in the .start file?

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Atoms login

2017-09-25 Thread Shamika Mohanan
Hello,

Is anyone having trouble logging into their ATOMS account? I'm unable to
log in or create a new account.

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Difference between pvApiCtx and scilabEnv

2017-07-12 Thread Shamika Mohanan
Hello,

I'm using Scilab 6.0.0 API. What is the difference between pvApiCtx and
scilabEnv? When I compile C++ code on Scilab 6.0.0 using pvApiCtx, I get
the following error-

error: 'pvApiCtx' was not declared in this scope
 int z=nbInputArgument(pvApiCtx);
   ^
/home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:53:
note: in definition of macro 'nbInputArgument'
 #define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX))

If I replace pvApiCtx with scilabEnv, I get the following error-

/home/scilab-6.0.0/share/scilab/../../include/scilab/api_stack_common.h:64:58:
error: expected primary-expression before ')' token
 #define nbInputArgument(PVCTX) (*getNbInputArgument(PVCTX))

How do I resolve this error for Scilab 6.0.0?

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Convert struct to mlist/tlist

2017-07-12 Thread Shamika Mohanan
Hello,

I'm using Scilab 5.5.0. How do I convert a struct to an mlit/tlist in
Scilab code?

For example, I have created a struct using date_st=struct('day',25,'month'
,'DEC','year',2006)

Is there any way to get the number of fields in the struct so that I can
loop over the struct? I want to do this operation for a struct with unknown
number of fields and values.

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Scilab error

2017-06-22 Thread Shamika Mohanan
Hello,

I use Scilab 5.5.0 on Ubuntu 14.04, 64 bit architecture. I installed Scilab
using apt-get.

I updated Ubuntu yesterday and since then I'm unable to start Scilab. I get
the error 'Segmentation fault (core dumped)'.

The same error occurs on Scilab 5.5.2 and Scilab 6.0 for scilab and
scilab-adv-cli mode. Only scilab-cli seems to be working. As we require
graphics features of Scilab, is there any solution to this problem?

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] varargout doubt

2016-11-07 Thread Shamika Mohanan
Hello,

I have a function defined as such

function varargout= callOct(fname,varargin)
varargout=list(callOctave(fname,varargin))
endfunction

When I call this function with [c,d]=callOct("butter",8,0.1), I get the
error
!--error 21
Invalid index.

If I call the function as c=callOct("butter",8,0.1), I get no error.
varargout stores only one o/p argument even though callOctave returns two
arguments.

If I remove varargout like this

function  [b,a]=callOct(fname,varargin)
[b,a]=callOctave(fname,varargin)
endfunction

Now when I call this function with [c,d]=callOct("butter",8,0.1), I get no
error.

I need callOct function to work with any number of output arguments and so
I need to use varargout. How do I get the function to work with varargout?

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Building macros

2016-10-07 Thread Shamika Mohanan
Hello,

I'm developing a toolbox in Scilab 5.5.0.

I'm trying to build the macros in a toolbox using tbx_build_macros
function. The macros folder has around 220 .sci functions. When I build the
toolbox, only 128 functions are built automatically. The toolbox build
stops here. There are many cpp functions in sci_gateway folder. These cpp
functions are not compiled at all. There are no errors in the remaining
.sci or cpp functions.

Is there a limit to the number of functions that can be built using
tbx_build_macros?

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] API Error

2016-10-04 Thread Shamika Mohanan
Hello,

I'm using Scilab 5.5.0 API in c++ code. I have the following code-

sciErr = getVarAddressFromPosition(pvApiCtx, 1, );
if(sciErr.iErr)
{
 printError(, 0);
 return 0
}

sciErr = getListItemNumber(pvApiCtx, piAddr, );
if(sciErr.iErr)
{
 printError(, 0);
 sciprint("This variable is not a list");
 return 0;
}
for( a= 1 ;a<=noItemList ; a++)
{
 sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, a, , ,
);
 if(sciErr.iErr)
 {
  printError(, 0);
  return 0;
 }
}

This is part of a larger function. For the function call d=callOct(c),where
c is an mlist (3D matrix),  I get the error

API Error:
in getMatrixOfDoubleInList: Unable to get address of item #2 in
argument #1
in getMatrixOfDouble: Invalid argument type, double matrix expected

What am I doing wrong?

Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Video Player in Scilab

2016-06-16 Thread Shamika Mohanan
Hello,

We are building a computer vision toolbox which requires developing a video
player.

We developed imshow using Matplot and then looped imshow over the number of
frames in the video to play the video. This method makes the video player
very slow. Is there any other way to play a video in Scilab using any
scripting tool/ GUI developer? Any leads would be appreciated.

Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Creating hypermatrix

2016-06-12 Thread Shamika Mohanan
Hello,

Is it possible to create a hypermatrix of type double/int/sparse directly
from C/C++ code? Right now I'm using lists to send back the hypermatrix
from C++ code to Scilab. This is a bit tedious as I have to convert the
list into a hypermatrix in Scilab for further calculations.

Regards,
Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] List API function error

2016-05-10 Thread Shamika Mohanan
I'm using Scilab API list function to access 2D/3D matrices from Scilab
environment in the C++ code. This list is then converted into a Mat object
and passed to OpenCV.

I'm having trouble accessing the child elements of the list.

int retrieveImage(Mat ,int pos)
{

SciErr sciErr;
int iRows=0,iCols=0,i,j,k=0;
int *piAddr = NULL;
int *piAddrChild = NULL;
int iPrec = 0,iItem = 0;

//retrieving number of items in the list and type of data(integer/float)
sciErr = getVarAddressFromPosition(pvApiCtx,pos,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}
sciErr = getListItemAddress(pvApiCtx,piAddr,1,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}
sciErr = getListItemNumber(pvApiCtx,piAddr,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}

if(isIntegerType(pvApiCtx, piAddrChild))
{
  // Retrieve 2D/3D matrices of int type
}
else //for floating point/ double precision values
{
if(iItem==3)
{

double *pstDataR = NULL;
double *pstDataG = NULL;
double *pstDataB = NULL;
sciErr = getVarAddressFromPosition(pvApiCtx,pos,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}

//retrive the matrix of the R values
sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 1, ,
, );
if(sciErr.iErr)
{
printError(, 0);
return 0;
}

//retrive address of the list
sciErr = getVarAddressFromPosition(pvApiCtx,pos,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}
//retrive the matrix of the G values
sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 2, ,
, );
if(sciErr.iErr)
{
printError(, 0);
return 0;
}

//retrive address of the list
sciErr = getVarAddressFromPosition(pvApiCtx,pos,);
if(sciErr.iErr)
{
printError(, 0);
return 0;
}
//retrive the matrix of the B values
sciErr = getMatrixOfDoubleInList(pvApiCtx, piAddr, 3, ,
, );
if(sciErr.iErr)
{
printError(, 0);
return 0;
}

//creating an image matrix with the no. of rows and columns we
retrieved, and assigning it to be of the form 8-bit unsinged integers
image = Mat(iRows,iCols,CV_64FC3);

//Now that we have the 3 matrices(R,G,B), we need to assign
those values to the pixels. The following code does this
k=0;
for(i=0;i

[Scilab-users] Set axes limit for plot

2016-04-28 Thread Shamika Mohanan
How do I set the minimum and maximum values for the axes in a plot?

When I use the plot command as

plot(x1,y1,x2,y2)

I get the plot where x axis is from 0 to 100 and y axis is from -20 to 120.
How do I set the axis from 25 to 100 for both x and y axes?

Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Sparse Boolean Matrix

2015-12-24 Thread Shamika Mohanan
I'm having trouble using Sparse Boolean Matrix API function in C++ code.
While I can get the row and column indices of the non zero elements in the
matrix, I don't see a pointer for the actual boolean values in the matrix.
I have to assign the boolean values to another matrix. How do I access the
boolean values in the sparse matrix?

Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Struct and Cell Array API function

2015-10-26 Thread Shamika Mohanan
Hi,

I posted this query on Scilab developer's mailing list but I got no reply.
I'm trying my luck here.

I'm using Scilab API in C++ code. I have to return struct and cell array
values to Scilab environment. As there are no Scilab API functions for
struct and cell array data types, is there any way to do it? If I do have
to write API functions, would list/mlist be the best way to deal with
structs and cell arrays?

Shamika
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users