compatibility_functions modules creation (from functions in m2sci module)
[scilab.git] / scilab / modules / compatibility_functions / macros / mtlb_eig.sci
1 function [vd,D]=mtlb_eig(A,B)
2 // Copyright INRIA
3 // Emulation function for eig() Matlab function
4 // V.C.
5
6 [lhs,rhs]=argn()
7
8 if rhs==1 then
9   if lhs==1 then
10     vd=spec(A)
11   else
12     [vd,D]=spec(A)
13     if isreal(vd,0) & size(vd,"*")>1 then
14       vd(:,1:2)=-vd(:,1:2)
15     end
16   end  
17 else
18   error("mtlb_eig() used with 2 rhs: not yet implemented !")
19 end
20 endfunction