Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - Português

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

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

Ajuda do Scilab >> Funções de Compatibilidade > 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 — extração de campos de listas
Report an issue
<< mtlb_isa Funções de Compatibilidade mtlb_isletter >>

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:57:51 CEST 2014