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

« back to all changes in this revision

Viewing changes to macros/percent/%p_prod.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 r=%p_prod(a,flag)
 
2
// Copyright INRIA
 
3
r=[]
 
4
[m,n]=size(a);
 
5
if flag==1|flag=='r' then
 
6
  for k=1:n,r(1,k)=prod(a(:,k)),end
 
7
end
 
8
if flag==2|flag=='c' then
 
9
  for k=1:m,r(k,1)=prod(a(k,:)),end
 
10
end
 
11
endfunction