Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - Русский - 日本語
Scilab Help >> Compatibility Functions > mtlb_mode

mtlb_mode

switch Matlab like operations

Syntax

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
Scilab Enterprises
Copyright (c) 2011-2015 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jun 15 08:27:54 CEST 2016