summaryrefslogtreecommitdiffstats
path: root/scilab/modules/differential_equations
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2010-02-16 11:30:53 +0100
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2010-02-16 11:30:53 +0100
commitf5d810984d61e289c9b0ab532fdd78130155bd7b (patch)
tree7e7ab64034caf909f2e169abeb6613bc52efc458 /scilab/modules/differential_equations
parent857280b48897ee74a8214eae841edeef7eb8a328 (diff)
parentec1b0f087e72d7ad26dc8d9146a45d2f0b156482 (diff)
downloadscilab-f5d810984d61e289c9b0ab532fdd78130155bd7b.zip
scilab-f5d810984d61e289c9b0ab532fdd78130155bd7b.tar.gz
Merge remote branch 'origin/5.2'
Conflicts: scilab/CHANGES_5.2.X scilab/configure scilab/m4/docbook.m4
Diffstat (limited to 'scilab/modules/differential_equations')
-rw-r--r--scilab/modules/differential_equations/help/en_US/intg.xml27
-rw-r--r--scilab/modules/differential_equations/help/fr_FR/intg.xml5
-rw-r--r--scilab/modules/differential_equations/help/pt_BR/intg.xml5
3 files changed, 20 insertions, 17 deletions
diff --git a/scilab/modules/differential_equations/help/en_US/intg.xml b/scilab/modules/differential_equations/help/en_US/intg.xml
index ec1afce..0f1df29 100644
--- a/scilab/modules/differential_equations/help/en_US/intg.xml
+++ b/scilab/modules/differential_equations/help/en_US/intg.xml
@@ -125,20 +125,21 @@
125 <title>Examples</title> 125 <title>Examples</title>
126 126
127 <programlisting role="example"><![CDATA[ 127 <programlisting role="example"><![CDATA[
128//Scilab function case 128//External écrit en Scilab
129function y=f(x),y=x*sin(30*x)/sqrt(1-((x/(2*%pi))^2)),endfunction 129function y=f(x),y=x*sin(30*x)/sqrt(1-((x/(2*%pi))^2)),endfunction
130exact=-2.5432596188; 130exact=-2.5432596188;
131I=intg(0,2*%pi,f) 131I=intg(0,2*%pi,f)
132abs(exact-I) 132abs(exact-I)
133 133
134//Scilab function case with parameter 134//External écrit en Scilab avec un argument
135function y=f1(x,w),y=x*sin(w*x)/sqrt(1-((x/(2*%pi))^2)),endfunction 135function y=f1(x,w),y=x*sin(w*x)/sqrt(1-((x/(2*%pi))^2)),endfunction
136I=intg(0,2*%pi,list(f1,30)) 136I=intg(0,2*%pi,list(f1,30))
137abs(exact-I) 137abs(exact-I)
138 138
139 139
140// Fortran code case (Fortran compiler required) 140// External écrit en Fortran (un compilateur Fortran est nécessaire)
141// write down the fortran code 141// Ecriture du code fortran
142cd TMPDIR;
142F=[' double precision function ffun(x)' 143F=[' double precision function ffun(x)'
143 ' double precision x,pi' 144 ' double precision x,pi'
144 ' pi=3.14159265358979312d+0' 145 ' pi=3.14159265358979312d+0'
@@ -147,18 +148,18 @@ F=[' double precision function ffun(x)'
147 ' end']; 148 ' end'];
148mputl(F,TMPDIR+'/ffun.f') 149mputl(F,TMPDIR+'/ffun.f')
149 150
150// compile the fortran code 151// compilation du code Fortran
151l=ilib_for_link('ffun','ffun.f',[],'f',TMPDIR+'/Makefile'); 152l=ilib_for_link('ffun','ffun.f',[],'f');
152 153
153// incremental linking 154// link incrémental
154link(l,'ffun','f') 155link(l,'ffun','f')
155 156
156//integrate the function 157// integration de la fonction
157I=intg(0,2*%pi,'ffun') 158I=intg(0,2*%pi,'ffun')
158abs(exact-I) 159abs(exact-I)
159 160
160// C code case (C compiler required) 161// External écrit en C (un compilateur C est nécessaire)
161// write down the C code 162// Ecriture du code C
162C=['#include <math.h>' 163C=['#include <math.h>'
163 'double cfun(double *x)' 164 'double cfun(double *x)'
164 '{' 165 '{'
@@ -168,13 +169,13 @@ C=['#include <math.h>'
168 '}']; 169 '}'];
169mputl(C,TMPDIR+'/cfun.c') 170mputl(C,TMPDIR+'/cfun.c')
170 171
171// compile the C code 172// compilation du code C
172l=ilib_for_link('cfun','cfun.f',[],'c',TMPDIR+'/Makefile'); 173l=ilib_for_link('cfun','cfun.f',[],'c');
173 174
174// incremental linking 175// incremental linking
175link(l,'cfun','c') 176link(l,'cfun','c')
176 177
177//integrate the function 178// integration de la fonction
178I=intg(0,2*%pi,'cfun') 179I=intg(0,2*%pi,'cfun')
179abs(exact-I) 180abs(exact-I)
180 ]]></programlisting> 181 ]]></programlisting>
diff --git a/scilab/modules/differential_equations/help/fr_FR/intg.xml b/scilab/modules/differential_equations/help/fr_FR/intg.xml
index b474114..c054a7b 100644
--- a/scilab/modules/differential_equations/help/fr_FR/intg.xml
+++ b/scilab/modules/differential_equations/help/fr_FR/intg.xml
@@ -128,6 +128,7 @@ abs(exact-I)
128 128
129// External écrit en Fortran (un compilateur Fortran est nécessaire) 129// External écrit en Fortran (un compilateur Fortran est nécessaire)
130// Ecriture du code fortran 130// Ecriture du code fortran
131cd TMPDIR;
131F=[' double precision function ffun(x)' 132F=[' double precision function ffun(x)'
132 ' double precision x,pi' 133 ' double precision x,pi'
133 ' pi=3.14159265358979312d+0' 134 ' pi=3.14159265358979312d+0'
@@ -137,7 +138,7 @@ F=[' double precision function ffun(x)'
137mputl(F,TMPDIR+'/ffun.f') 138mputl(F,TMPDIR+'/ffun.f')
138 139
139// compilation du code Fortran 140// compilation du code Fortran
140l=ilib_for_link('ffun','ffun.f',[],'f',TMPDIR+'/Makefile'); 141l=ilib_for_link('ffun','ffun.f',[],'f');
141 142
142// link incrémental 143// link incrémental
143link(l,'ffun','f') 144link(l,'ffun','f')
@@ -158,7 +159,7 @@ C=['#include <math.h>'
158mputl(C,TMPDIR+'/cfun.c') 159mputl(C,TMPDIR+'/cfun.c')
159 160
160// compilation du code C 161// compilation du code C
161l=ilib_for_link('cfun','cfun.f',[],'c',TMPDIR+'/Makefile'); 162l=ilib_for_link('cfun','cfun.f',[],'c');
162 163
163// incremental linking 164// incremental linking
164link(l,'cfun','c') 165link(l,'cfun','c')
diff --git a/scilab/modules/differential_equations/help/pt_BR/intg.xml b/scilab/modules/differential_equations/help/pt_BR/intg.xml
index 02bc06c..4b13c0d 100644
--- a/scilab/modules/differential_equations/help/pt_BR/intg.xml
+++ b/scilab/modules/differential_equations/help/pt_BR/intg.xml
@@ -139,6 +139,7 @@ abs(exact-I)
139 139
140// caso de cdigo FORTRAN (compilador FORTRAN requerido) 140// caso de cdigo FORTRAN (compilador FORTRAN requerido)
141// escreve o cdigo FORTRAN 141// escreve o cdigo FORTRAN
142cd TMPDIR;
142F=[' double precision function ffun(x)' 143F=[' double precision function ffun(x)'
143 ' double precision x,pi' 144 ' double precision x,pi'
144 ' pi=3.14159265358979312d+0' 145 ' pi=3.14159265358979312d+0'
@@ -148,7 +149,7 @@ F=[' double precision function ffun(x)'
148mputl(F,TMPDIR+'/ffun.f') 149mputl(F,TMPDIR+'/ffun.f')
149 150
150// compile o cdigo FORTRAN 151// compile o cdigo FORTRAN
151l=ilib_for_link('ffun','ffun.f',[],'f',TMPDIR+'/Makefile'); 152l=ilib_for_link('ffun','ffun.f',[],'f');
152 153
153// linking incremental 154// linking incremental
154link(l,'ffun','f') 155link(l,'ffun','f')
@@ -169,7 +170,7 @@ C=['#include <math.h>'
169mputl(C,TMPDIR+'/cfun.c') 170mputl(C,TMPDIR+'/cfun.c')
170 171
171// compile o cdigo C 172// compile o cdigo C
172l=ilib_for_link('cfun','cfun.c',[],'c',TMPDIR+'/Makefile'); 173l=ilib_for_link('cfun','cfun.c',[],'c');
173 174
174// linking incremental 175// linking incremental
175link(l,'cfun','c') 176link(l,'cfun','c')