- Scilab help
- call_scilab API (Scilab engine)
- Boolean management
- Complex management
- DisableInteractiveMode
- Double management
- GetLastJob
- ScilabHaveAGraph
- SendScilabJob
- SendScilabJobs
- StartScilab
- String management
- TerminateScilab
- call_scilab
- Compile and run with Call Scilab
- creadbmat (obsolete)
- creadchain (obsolete)
- creadcmat (obsolete)
- creadmat (obsolete)
- cwritebmat (obsolete)
- cwritechain (obsolete)
- cwritecmat (obsolete)
- cwritemat (obsolete)
- fromc
- fromjava
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
However, this page did not exist in the previous stable version.
creadbmat (obsolete)
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.
int C2F(creadbmat)(char *name, int *m, int *n, int *scimat, unsigned long name_len);
Arguments
- name
The name of the future Scilab variable
- m
Number of rows
- n
Number of columns
- scimat
The actual matrix of boolean (array of int). Note that it is going to be stored in Scilab columnwise.
- name_len
The length of the variable name(fortran compatibility)
- C2F
C2F is just a macro which provides to this function the ability to be called from fortran
Description
This help describes how to use the function creadbmat.
Using this function will retrieve a variable called name from Scilab memory into a standard C int *.
Examples
/* Load the previously set variable B */ // See: modules/call_scilab/examples/basicExamples/readwriteboolean.c int rowB_ = 0, colB_ = 0, lp_ = 0; int i = 0, j = 0; int *matrixOfBooleanB = NULL; /* Int instead of double */ char variableToBeRetrievedB[] = "B"; /* First, retrieve the size of the matrix */ C2F(cmatbptr)(variableToBeRetrievedB, &rowB_, &colB_, &lp_, strlen(variableToBeRetrievedB)); /* Alloc the memory */ matrixOfBooleanB=(int*)malloc((rowB_*colB_)*sizeof(int)); /* Load the matrix */ C2F(creadbmat)(variableToBeRetrievedB,&rowB_,&colB_,matrixOfBooleanB,strlen(variableToBeRetrievedB) ); printf("\n"); printf("Display from B formated (size: %d, %d):\n",rowB_, colB_); for(j = 0 ; j < rowB_ ; j++) { for(i = 0 ; i < colB_ ; i++) { /* Display the formated matrix ... the way the user * expect */ printf("%d ",matrixOfBooleanB[i * rowB_ + j]); } printf("\n"); /* New row of the matrix */ }
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
- cwritebmat — 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.
- Boolean Management — How to manage Scilab's boolean read and write process using call_scilab and api_scilab
Authors
Sylvestre Ledru
<< Compile and run with Call Scilab | call_scilab API (Scilab engine) | creadchain (obsolete) >> |