0f3f3ae569ad8692e92e2a60e44e6e4d6201a9ec
[scilab.git] / scilab / modules / overloading / macros / %lss_e.sci
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) INRIA
3 //
4 // Copyright (C) 2012 - 2016 - Scilab Enterprises
5 //
6 // This file is hereby licensed under the terms of the GNU GPL v2.0,
7 // pursuant to article 5.3.4 of the CeCILL v.2.1.
8 // This file was originally licensed under the terms of the CeCILL v2.1,
9 // and continues to be available under such terms.
10 // For more information, see the COPYING file which you should have received
11 // along with this program.
12
13 function [f1,f2,f3,f4,f5,f6,f7]=%lss_e(i,j,f)
14     // f= f(i,j)
15
16     if type(i)==10 then
17         [lhs,rhs]=argn(0)
18         if rhs<>2 then  error(21),end
19         nams=["A","B","C","D","X0","dt"]
20         for k=1:prod(size(i))
21             kf=find(convstr(i(k),"u")==nams)
22             if kf==[] then error(21),end
23             execstr("f"+string(k)+"=j(kf+1)")
24         end
25         return
26     end
27     if type(i)==4 then i=find(i),end
28     if type(j)==4 then j=find(j),end
29     [a,b,c,d,x0,dom]=f(2:7)
30     f1=tlist(["lss","A","B","C","D","X0","dt"],a,b(:,j),c(i,:),d(i,j),x0,dom)
31     if f1("D")==[] then f1=[],end
32 endfunction