Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Функции > Библиотеки > library

library

library datatype description

Syntax

Description

A library is a data type with type number 14. It contains a path-name and a set of names. It allows automatic loading of variables using the following algorithm:

Suppose the Scilab user references the variable named foo. Scilab first looks if foo is the name of a primitive or of an already defined variable. If not, it looks for foo sequentially (the newest first) in all defined library .

Suppose foo belongs to the set of names of the library xlib then Scilab tries to load the file <xlib-path-name>/foo.bin. <xlib-path-name>/foo.bin must have been created using the save function

Library are often used for collection of functions, but they can also be used for any collection of scilab variables

If a function is defined in more than one library, the default search algorithm loads thode contained in the newest. It possible to force the use of a specific library using dot notation:

xlib.foo loads the variable foo contained in xlib. if foo is a function and xlib.foo(args) executes the functions

Examples

// elemlib is a predefined library
elementary_functionlib //displays the contents of the library
A=rand(3,3);
cosm(A) //loads cosm and executes it
whos -name cosm // now cosm is a variable
elementary_functionlib.sinm //loads sinm from the library
elementary_functionlib.cosm(A) //reloads cosm and executes it

See also

  • lib — loads a library of Scilab functions and variables, and sets its name
  • string — преобразование в строку
  • load — Loads some archived variables, a saved graphic figure, a library of functions
  • save — Saves some chosen variables in a binary data file
Report an issue
<< librarieslist Библиотеки libraryinfo >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:55:07 CET 2020