1 <?xml version="1.0" encoding="UTF-8"?>
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2009 - DIGITEO - Vincent COUVERT
6 * Copyright (C) 2012 - 2016 - Scilab Enterprises
8 * This file is hereby licensed under the terms of the GNU GPL v2.0,
9 * pursuant to article 5.3.4 of the CeCILL v.2.1.
10 * This file was originally licensed under the terms of the CeCILL v2.1,
11 * and continues to be available under such terms.
12 * For more information, see the COPYING file which you should have received
13 * along with this program.
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="m2sci_isa">
18 <refname>isa (Matlab function)</refname>
19 <refpurpose>Detect an object of a given type</refpurpose>
22 <title>Matlab/Scilab equivalent</title>
24 There is no equivalent function for Matlab <emphasis role="strong">isa</emphasis>
25 function in Scilab but it can be replaced by equivalent syntaxes as shown is examples.
33 <emphasis role="strong">Equivalence table</emphasis>
47 <para> a = isa(x,"logical") </para>
50 <para>a = type(x)==4; </para>
55 <para> b = isa(x,"char") </para>
58 <para>b = type(x)==10; </para>
63 <para> c = isa(x,"numeric") </para>
66 <para>c = or(type(x)==[1,5,8]); </para>
71 <para> d = isa(x,"int8") </para>
74 <para>d = typeof(x)=='int8'; </para>
79 <para> e = isa(x,"uint8") </para>
82 <para>e = typeof(x)=='uint8'; </para>
87 <para> f = isa(x,"int16") </para>
90 <para>f = typeof(x)=="int16"; </para>
95 <para> g = isa(x,"uint16") </para>
98 <para>g = typeof(x)=="uint16"; </para>
103 <para> h = isa(x,"int32") </para>
106 <para>h = typeof(x)=="int32"; </para>
111 <para> k = isa(x,"uint32") </para>
114 <para>k = typeof(x)=="uint32"; </para>
119 <para> l = isa(x,"single") </para>
122 <para>l = type(x)==1; </para>
127 <para> m = isa(x,"double") </para>
130 <para>m = type(x)==1; </para>
135 <para> n = isa(x,"cell") </para>
138 <para>n = typeof(x)=="ce"; </para>
143 <para> o = isa(x,"struct") </para>
146 <para>o = typeof(x)=="st"; </para>
151 <para> p = isa(x,"function_handle") </para>
154 <para>p = type(x)==13; </para>
159 <para> q = isa(x,"sparse") </para>
162 <para>q = type(x)==5; </para>
167 <para> r = isa(x,"lti") </para>
170 <para>r = typeof(x)=="state-space"; </para>