[Scilab-users] Atoms toolbox : iodelay toolbox by S.steer
Lucien Povy
lucien.povy at free.fr
Tue Oct 5 17:24:00 CEST 2021
Hello all,
With new version of Scilab >6.1? we cannot use iodelay toolbox : problem
with %rd_string.
I propose a new version of this macro. (pièce jointe %rd_string)
Regards
lucien.povy at free.fr
-------------- next part --------------
// ====================================================================
// Copyright (C) - lucien.povy at free.fr. Carantec 2020.
// This file must be used under the terms of the GNU GPL v2.0 licence.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// https://www.gnu.org/licenses/licenses.en.html
// ====================================================================
// String output of iodelay systems matrices for scilab > 6.1.?
// ====================================================================
function txt=%rd_string(H)
r= H.H; d=H.iodelay;
[m,n]=size(r);
Sr=string(r)(:);//for systems without delay.
Sd=string(-d)(:);//now the delays.
w="*exp("+Sd+"*"+varn(r)+")";
w(find(d==0))="";
for j=2:3:3*m*n-1
Sr(j)=part("-",ones(1,length(Sr(j))));
end
Srl=[]; Stxt=[];
for i=1:m*n
Srl=[Srl;[Sr(3*(i-1)+1:3*i);blanks(length(Sr(3*i)))]];
pw(i)=part("",1:length(w(i)));
Stxt=[Stxt;[pw(i);w(i);pw(i);blanks(length(w(i)))]];
end
tx=Srl+Stxt;
txt=matrix(tx,size(tx,"*")/n,n);
txt=blanks(4)+txt;
endfunction
More information about the users
mailing list