Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語

Please note that the recommended version of Scilab is 6.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.

Aide Scilab >> API call_scilab (moteur Scilab) > cwritebmat (obsolete)

cwritebmat (obsolete)

Write a single boolean or a matrix of boolean into Scilab memory using call_scilab. Starting with Scilab 5.2, this function is obsolete. See API_Scilab: Boolean writing for remplacement.

int C2F(cwritebmat)(char *name, int *m, int *n, int *mat, unsigned long name_len);



The name of the future Scilab variable


Number of rows


Number of columns


The actual matrix of boolean (array of int). Note that it is going to be stored in Scilab columnwise.


The length of the variable name (fortran compatibility)


C2F is just a macro which provides to this function the ability to be called from fortran


This help describes how to use the function cwritebmat.

Using this function will basically do the same as A=[ T F F T ]; but straight into Scilab memory with call_scilab.


// This example shows how to write a Scilab matrix of boolean in Scilab engine
// It is the equivalent to 
// B=[F F T F;
//    F F F T ] in Scilab interpretor
// See: modules/call_scilab/examples/basicExamples/readwriteboolean.c

// StartScilab
int B[]={0,0,0,0,1,0,0,1};   /* Declare the matrix */
int rowB=2, colB=4; /* Size of the matrix */
char variableNameB[] = "B";
C2F(cwritebmat)(variableNameB, &rowB, &colB, B, strlen(variableNameB)); /* Write it into Scilab's memory */
printf("Display from Scilab of B:\n");
SendScilabJob("disp(B);"); /* Display B */

See Also

  • Call_Scilab — call_scilab is an interface which provides the ability to call Scilab engine from C/C++ code
  • api Scilab — api_scilab is the Scilab interface to read/write data from/to Scilab memory
  • API_Scilab: Boolean reading — How to read matrix of boolean.
  • API_Scilab: Boolean writing — How to write matrices of boolean.
  • SendScilabJob — Send a Scilab task from a C/C++ code (call_scilab)
  • StartScilab — Initializes and starts Scilab engine in Call Scilab
  • creadbmat — Read a single boolean or a matrix of boolean from Scilab memory using call_scilab. Starting with Scilab 5.2, this function is obsolete. See API_Scilab: Boolean reading for remplacement.
  • Boolean Management — How to manage Scilab's boolean read and write process using call_scilab and api_scilab


Sylvestre Ledru

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Oct 05 12:11:04 CEST 2011