Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - 日本語

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

Справка Scilab >> Функции для совместимости > mtlb_isfield

mtlb_isfield

Matlab isfield emulation function

Description

There is no Scilab equivalent function for Matlab isfield(st,f) and equivalent expressions behave differently in some particular cases:

  • If st is not a structure: Scilab equivalent returns an error message but Matlab returns 0.

The function mtlb_isfield(st,f) is used by mfile2sci to replace isfield(st,f) when it was not possible to know what were the inputs while porting Matlab code to Scilab. This function will determine the correct semantic at run time. If you want to have a more efficient code it is possible to replace mtlb_isfield calls:

  • If st is a structure tf = mtlb_isfield(st,f) may be replaced by allf=getfield(1,st);tf=or(allf(3:$)==f);

  • If st is not a structure tf = mtlb_isfield(st,f) may be replaced by tf=%F;

Caution: mtlb_isfield has not to be used for hand coded functions.

See Also

  • getfield — выделение поля списка
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 14:01:18 CEST 2014