Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2007-01-23 20:14:48
Size: 719
Editor: cornet
Comment:
Revision 9 as of 2020-08-24 09:58:52
Size: 294
Comment: update link #2
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Scilab API = API Scilab =
Line 3: Line 3:
Some examples (tips) to manipulate Scilab structures Scilab old APIs (stack1, stack2 and stack3) have been deprecated.
API Scilab is now the way to go. This API is available since Scilab 5.2.0 and will be maintained in Scilab 6.X family whereas old API stack will be dropped.
Line 5: Line 6:
boolean matrix (Scilab 5.x) :

{{{
int m=3,n=2;
int mat[6]; /* m * n = 6 */
mat[0]=1;
mat[1]=0;
mat[2]=1;
mat[3]=0;
mat[4]=1;
mat[0]=0;

if (! C2F(cwritebmat)("test_bool",&m,&n,&mat,strlen("test_bool")) )
{
  /* error */
}
else
{
  int m2=3,n2=2;
  int mat2[6]; /* m2 * n2 = 6 */

  if ( ! C2F(creadbmat)("test_bool",&m2,&n2,&mat2,strlen("test_bool")) )
  {
    /* error */
  }
  else
  {
    int i,j=0;

    SendScilabJob("disp(test_bool);");
    for (i=0;i<m2;i++)
    {
      for (j=0;j<n2;j++)
      {
        printf("[%d,%d] : %d ",i+1,j+1,mat2[(i*j)+i]);
      }
      printf("\n");
    }
  }
}

}}}
See: https://help.scilab.org/api_scilab_legacy

API Scilab

Scilab old APIs (stack1, stack2 and stack3) have been deprecated. API Scilab is now the way to go. This API is available since Scilab 5.2.0 and will be maintained in Scilab 6.X family whereas old API stack will be dropped.

See: https://help.scilab.org/api_scilab_legacy

public: Scilab API (last edited 2020-08-24 09:58:52 by clement.david@scilab-enterprises.com)