Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - English

Change language to:
Français - 日本語 - Português - Русский

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.

Scilab Help >> Compatibility Functions > mtlb_mode

mtlb_mode

switch Matlab like operations

Calling Sequence

mmode = mtlb_mode()
mtlb_mode(mmode)

Arguments

mmode

boolean

Description

Scilab and Matlab additions and subtractions work differently when used with empty matrices:

Scilab

a=1;
a+[]
// -->a

a-[]
// -->a

[]+a
// -->a

[]-a
// -->-a
Matlab
a+[] -->[]
a-[] -->[]
[]+a -->[]
[]-a -->[]

mtlb_mode(%t) switches to Matlab evaluation mode for additions and subtractions. mtlb_mode(%f) switches back to Scilab mode.

mtlb_mode() returns the current mmode' value (%t=Matlab, %f=Scilab).

See Also

  • empty — ([]) empty matrix
Report an issue
<< mtlb_min Compatibility Functions mtlb_more >>

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:
Thu Oct 02 13:47:02 CEST 2014