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

« back to all changes in this revision

Viewing changes to macros/percent/%s_or.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:
 
1
function x=%s_or(a,flag)
 
2
// or(a) returns the logical OR
 
3
// for scalar matrices, an entry is TRUE if it is not zero.
 
4
//!
 
5
// Copyright INRIA
 
6
if argn(2)==1 then flag='*',end
 
7
if flag=='*' then
 
8
  x=find(abs(a)>0,1)<>[]
 
9
else
 
10
  if a==[] then x=[],return,end
 
11
  x=sum(bool2s(a),flag)>=1
 
12
end
 
13
endfunction