File: minode.ode

package info (click to toggle)
xppaut 8.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,332 kB
  • sloc: ansic: 74,690; makefile: 127; sh: 92
file content (22 lines) | stat: -rwxr-xr-x 425 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export {nlo,nhi} {mymin}
par nlo=0,nhi=49
mymin=0
table junk % 50 0 49 ran(1)
x[0..49]'=-x[j]+junk([j])
aux lo=mymin
done
---------------------------------------
#include <math.h>
fun(double *in,double *out,int nin,int nout,double *var,double *con)
{
  int nmin=(int)in[0],i;
 int nmax=(int)in[1];
 double d=var[nmin+1],dnew;
 for(i=nmin;i<=nmax;i++){
   dnew=fabs(var[i+1]);
   if(dnew<d){
     d=dnew;
   }
 }
 out[0]=d;
}