~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to macros/percent/%b_i_s.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
[lhs,rhs]=argn(0)
5
5
M=varargin(rhs)
6
6
//if M<>[] then M=M<>0,end
 
7
N=varargin(rhs-1)//inserted matrix
 
8
index=varargin(1) //
7
9
 
8
 
N=bool2s(varargin(rhs-1))//inserted matrix
9
 
if rhs<=4 then
10
 
  if rhs==3 then
11
 
    M(varargin(1))=N
12
 
  else
13
 
    M(varargin(1),varargin(2))=N
14
 
  end
 
10
if rhs==3&(type(index)==10|type(index)==15) then
 
11
  M=createstruct(index,N)
15
12
  return
16
13
end
17
 
  
 
14
if M<>[] then N=bool2s(N),def=0,else def=%f,end
 
15
 
18
16
M=mlist(['hm','dims','entries'],size(M),M(:))
19
17
dims=M('dims')
20
18
v=M('entries');v=v(:)
47
45
  end
48
46
end
49
47
//
50
 
if prod(dims1)>size(v,'*') then v(prod(dims1))=%f,end
 
48
if prod(dims1)>size(v,'*') then v(prod(dims1))=def,end
51
49
v(I+1)=N(:)
52
50
 
53
51
 
62
60
else
63
61
  M=mlist(['hm','dims','entries'],dims1,v)
64
62
end
65
 
 
66
 
 
67
 
 
68
 
 
 
63
endfunction