summaryrefslogtreecommitdiffstats
path: root/scilab_doc
diff options
context:
space:
mode:
authorFarid Belahcene <farid.belahcene@inria.fr>2006-09-01 09:26:06 +0000
committerFarid Belahcene <farid.belahcene@inria.fr>2006-09-01 09:26:06 +0000
commitf81763976443c5e3ab6af2d0b72b0c319e3f0229 (patch)
tree4db0bee80af8b5137b091b21c0ffc25068411a4e /scilab_doc
parent272c19bfb20ef5c9db9e272e5f14392d4e6aeee3 (diff)
downloadscilab-f81763976443c5e3ab6af2d0b72b0c319e3f0229.zip
scilab-f81763976443c5e3ab6af2d0b72b0c319e3f0229.tar.gz
New modifications
Diffstat (limited to 'scilab_doc')
-rw-r--r--scilab_doc/toolbox_guide/toolbox_example/src/fun1.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/scilab_doc/toolbox_guide/toolbox_example/src/fun1.c b/scilab_doc/toolbox_guide/toolbox_example/src/fun1.c
index 833a0a9..ce91966 100644
--- a/scilab_doc/toolbox_guide/toolbox_example/src/fun1.c
+++ b/scilab_doc/toolbox_guide/toolbox_example/src/fun1.c
@@ -1,17 +1,15 @@
1void fun2(double *, int, int *); 1extern void fun2(double *, int, int *);
2 2
3void fun1(double * a, int na, int * nb, double ** b , double * positive_sum) 3void fun1(double * a, int na, int * nx, double ** x , double * y){
4{ 4 int i, k1=0;
5int i, k1=0; 5 *y=0;
6*positive_sum=0; 6 fun2(a, na, nx);
7fun2(a, na, nb); 7 *x=(double *)malloc((*nx)*sizeof(double));
8*b=(double *)malloc((*nb)*sizeof(double)); 8 *y=0;
9*positive_sum=0; 9 for(i=0;i<na;i++)
10for(i=0;i<na;i++) 10 if(a[i]>0) {
11 if(a[i]>0) 11 *(*x+k1)=a[i];
12 { 12 *y += a[i];
13 *(*b+k1)=a[i]; 13 k1++;
14 *positive_sum += a[i]; 14 };
15 k1++;
16 };
17} \ No newline at end of file 15} \ No newline at end of file