lettura simple

List of Variables in Scilab

Within Scilab, the comprehensive list of active workspace variables is readily accessible through the `who` command.

who

Executing this command unveils every variable housed within the workspace, spanning both the global and local scopes.

Here's a hands-on example.

Let's say you've set up the following variables:

a = 5;
b = 'text';
c = [1, 2, 3];
global d

Upon entering the `who` command into Scilab's command line, the system promptly lists all defined variables in the current workspace, which, in this case, would include "a", "b", "c", and "d".

who

Should your interest be solely in the local variables, the command to use is who('global'), specifying the 'global' type within the parentheses.

who('global')

Conversely, to exclusively display global variables, the appropriate command is who('local').

who('local')

It's worth noting that Scilab's graphical interface offers another avenue to view these variables. Specifically, users can navigate to the Variable Browser window for a visual representation.

Scilab's Variable Browser




Report a mistake or post a question




FacebookTwitterLinkedinLinkedin