diff options
author | siddhu8990 | 2016-03-07 20:42:23 +0530 |
---|---|---|
committer | siddhu8990 | 2016-03-07 20:42:23 +0530 |
commit | 7198d73fe85d35ef63a88e3c5cc87dc9bbd24ccb (patch) | |
tree | ee21597eb488d0937d80be7d8dab1bb269da753f /2.3-1/src/c | |
parent | 070c6a83075034f4322faf84b1c4623da314a2e9 (diff) | |
download | Scilab2C-7198d73fe85d35ef63a88e3c5cc87dc9bbd24ccb.tar.gz Scilab2C-7198d73fe85d35ef63a88e3c5cc87dc9bbd24ccb.tar.bz2 Scilab2C-7198d73fe85d35ef63a88e3c5cc87dc9bbd24ccb.zip |
Errors in bit***.h files fixed
Diffstat (limited to '2.3-1/src/c')
10 files changed, 51 insertions, 6 deletions
diff --git a/2.3-1/src/c/differential_calculus/includes/ode.h b/2.3-1/src/c/differential_calculus/includes/ode.h new file mode 100644 index 00000000..46220a84 --- /dev/null +++ b/2.3-1/src/c/differential_calculus/includes/ode.h @@ -0,0 +1,9 @@ +// FOSSEE IIT Bombay +#ifdef __INT_ODE_H__ +#define __INT_ODE_H__ + +double ODE(double initial_value, double start_time, double end_time, \ + char *ode_function, double nequs, double eps_abs, double eps_rel \ + double step_size) + +#endif /*__INT_ODE_H__*/
\ No newline at end of file diff --git a/2.3-1/src/c/differential_calculus/interfaces/int_ode.h b/2.3-1/src/c/differential_calculus/interfaces/int_ode.h new file mode 100644 index 00000000..5000ed5e --- /dev/null +++ b/2.3-1/src/c/differential_calculus/interfaces/int_ode.h @@ -0,0 +1,9 @@ +// FOSSEE IIT Bombay + +#ifdef __INT_ODE_H__ +#define __INT_ODE_H__ + +#define d0d0d0g2ODEd0(in1, in2, in3, in4) ODE(in1, in2, in3, in4, 1, 1.0e-2,\ + 1.0e-2, 1.0e-6) + +#endif /*__INT_ODE_H__*/
\ No newline at end of file diff --git a/2.3-1/src/c/differential_calculus/ode/ode.c b/2.3-1/src/c/differential_calculus/ode/ode.c new file mode 100644 index 00000000..b815e367 --- /dev/null +++ b/2.3-1/src/c/differential_calculus/ode/ode.c @@ -0,0 +1,26 @@ +// FOSSEE IIT Bombay + +#include "ODE.h" +#include "types.h" + + +double ODE(double initial_value, double start_time, double end_time, \ + char *ode_function, double nequs, double eps_abs, double eps_rel \ + double step_size) +{ + double out = 0; + int status; + //Setup ODE related parameters + gsl_odeiv2_system sys = {ode_function, NULL, 2, NULL}; + + gsl_odeiv2_step *s = gsl_odeiv2_step_alloc (gsl_odeiv2_step_rkf45, nequs); + gsl_odeiv2_control *c = gsl_odeiv2_control_y_new (eps_abs, eps_rel); + gsl_odeiv2_evolve *e = gsl_odeiv2_evolve_alloc (nequs); + + status = gsl_odeiv2_evolve_apply_fixed_step (e, c, s, &sys, &t, stepsize, x_dot); + + if (status == GSL_SUCCESS) { + return out; + } + else return 0; +} diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitand.h b/2.3-1/src/c/elementaryFunctions/includes/bitand.h index b7f5151e..f411e05b 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitand.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitand.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif /* bitand returns the logical AND operation diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h index 8176681e..aa182659 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitcmp.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif /* bitcmp returns the complement diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitget.h b/2.3-1/src/c/elementaryFunctions/includes/bitget.h index 0eaf57eb..47191558 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitget.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitget.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitor.h b/2.3-1/src/c/elementaryFunctions/includes/bitor.h index 16a6a3d1..d915ffae 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitor.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitor.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif /* bitor returns the logical OR operation diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitset.h b/2.3-1/src/c/elementaryFunctions/includes/bitset.h index 862a4c80..52f9f2cf 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitset.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitset.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif diff --git a/2.3-1/src/c/elementaryFunctions/includes/bitxor.h b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h index 4e276353..3bc77a2e 100644 --- a/2.3-1/src/c/elementaryFunctions/includes/bitxor.h +++ b/2.3-1/src/c/elementaryFunctions/includes/bitxor.h @@ -8,7 +8,7 @@ #include "dynlib_elementaryfunctions.h" #include "types.h" -#ifdef __cpluscplus +#ifdef __cplusplus extern "C" { #endif /* bitxor returns the logical OR operation diff --git a/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h b/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h index 9eb0ed4a..acbf8e21 100644 --- a/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h +++ b/2.3-1/src/c/scilab-arduino/default_files/setup_arduino.h @@ -24,6 +24,7 @@ ** --- SCI2C Includes. --- ** ----------------------- */ +#include "Arduino.h" #include "sci2clib.h" /* ** --------------------------- |