summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci')
-rw-r--r--texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci65
1 files changed, 65 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci b/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci
new file mode 100644
index 00000000..0e2f9d0a
--- /dev/null
+++ b/texmf-dist/scripts/ketpic/ketlib/ketpicscifiles6/PutcoLexpr.sci
@@ -0,0 +1,65 @@
+// 10.04.01
+
+function PutcoLexpr(varargin)
+ Nargs=length(varargin);
+ TbL=varargin(1);
+ if type(TbL)~=15
+ disp('Tabledata missing')
+ return;
+ end;
+ Ag=varargin(2);
+ if type(Ag)==1
+ CoL=Ag;
+ else
+ Alpha='-ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+ Clm=[];
+ for I=1:length(Ag)
+ C=part(Ag,I:I);
+ Tmp=ascii(C);
+ if Tmp>=96
+ C=char(Tmp-32);
+ end;
+ Tmp=mtlb_findstr(C,Alpha)
+ if length(Tmp)>0
+ Clm=[Clm,Tmp-1];
+ end;
+ end;
+ Nrg=0;
+ for I=length(Clm):-1:1
+ Tmp=Clm(I);
+ Tmp1=length(Clm)-I;
+ Nrg=Nrg+Tmp*26^Tmp1;
+ end;
+ CoL=Nrg;
+ end;
+ Nr=length(TbL(3))+1;
+ K=1;
+ Dpos=varargin(3);
+ for I=4:Nargs
+ if I-3>Nr
+ break;
+ end;
+ Dt=varargin(I);
+ if type(Dt)~=15
+ Dt='$'+Dt+'$';
+ Putcell(TbL,CoL,K,Dpos,Dt);
+ K=K+1;
+ else
+ N=length(Dt);
+ Str='$'+Dt(N)+'$';
+ Rrng=[K,K+1];
+ Pos=Dpos;
+ for J=1:(N-1)
+ Tmp=Dt(J);
+ if type(Tmp)==1
+ Rrng=[K,K+Tmp];
+ end;
+ if type(Tmp)==10
+ Pos=Tmp;
+ end;
+ end;
+ Putcell(TbL,CoL,Rrng,Pos,Str)
+ K=Rrng(2);
+ end;
+ end;
+endfunction;