~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/m2sci/sci_all.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function [stk,txt,top]=sci_all()
 
2
// Copyright INRIA
 
3
txt=[]
 
4
v=stk(top-rhs+1)(1),
 
5
if rhs==1 then
 
6
  [m,n]=checkdims(stk(top))
 
7
  x=stk(top)(1)
 
8
  if m==-1&n==-1 then
 
9
    set_infos(['mtlb_all('+x+') may be replaced by '
 
10
         'and('+x+')'+' if '+x+'is a vector'
 
11
         'and('+x+',1)'+' if '+x+'is a matrix'],1)
 
12
    stk=list('mtlb_all('+x+')','0','?','?','4')
 
13
  elseif m==1|n==1 then
 
14
    stk=list('and('+x+')','0','1','1','4')
 
15
  else
 
16
    stk=list('and('+x+',1)','0','1',stk(top)(4),'4')
 
17
  end
 
18
else
 
19
  if stk(top)(1)=='1' then
 
20
    stk=list('and('+v+',1)','0','1',stk(top-1)(4),'4')
 
21
  elseif stk(top)(1)=='2' then  
 
22
    stk=list('and('+v+',2)','0',stk(top-1)(3),'1','4')
 
23
  else  
 
24
    x=stk(top)(1)
 
25
    stk=list('and('+v+','+x+')','0','?','?','4')
 
26
  end
 
27
  top=top-1
 
28
end
 
29
 
 
30