1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2// Copyright (C) 2016 - INRIA - Serge Steer 3// 4// This file is licensed under the terms of the GNU GPL v2.0, 5// pursuant to article 5.3.4 of the CeCILL v.2.1. 6// For more information, see the COPYING file which you should have received 7// along with this program. 8function r=%zpk_f_zpk(a,b) 9 [ma,na]=size(a) 10 [mb,nb]=size(b) 11 if a.dt<>b.dt then 12 error(msprintf(_("%s: time domains are not compatible.\n"),"[a;b]")) 13 end 14 if na<>nb then 15 error(msprintf(_("%s: Incompatible input arguments #%d and #%d: Same number of columns expected.\n"),"[a;b]",1,2)) 16 end 17 //next instruction produce wrong results (bug 14801) 18 //r=zpk([a.Z;b.Z],[a.P;b.P],[a.K;b.K],a.dt) 19 20 Z=a.Z 21 Z(ma+1:ma+mb,:)=b.Z 22 P=a.P 23 P(ma+1:ma+mb,:)=b.P 24 K=[a.K;b.K] 25 r=zpk(Z,P,K,a.dt) 26endfunction 27