summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/logspace/dlogspacea.c
diff options
context:
space:
mode:
authorsiddhu89902017-05-22 15:13:54 +0530
committersiddhu89902017-05-22 15:13:54 +0530
commitb33afdb2311fbe8aad4c5c614c6098585fe2d279 (patch)
tree3d8db91388dab60159248fb0cfef160ca03cefeb /src/c/elementaryFunctions/logspace/dlogspacea.c
parentf0e074cc43f04f58aafe00742b9748a09f77894f (diff)
parente36eac94dd517bb69d3e5782516ee58942451991 (diff)
downloadScilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.gz
Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.tar.bz2
Scilab2C_fossee_old-b33afdb2311fbe8aad4c5c614c6098585fe2d279.zip
Bugs fixed for Scilab 6.0
Diffstat (limited to 'src/c/elementaryFunctions/logspace/dlogspacea.c')
-rw-r--r--src/c/elementaryFunctions/logspace/dlogspacea.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/c/elementaryFunctions/logspace/dlogspacea.c b/src/c/elementaryFunctions/logspace/dlogspacea.c
index 3a9caf1..62802f7 100644
--- a/src/c/elementaryFunctions/logspace/dlogspacea.c
+++ b/src/c/elementaryFunctions/logspace/dlogspacea.c
@@ -9,14 +9,16 @@
Organization: FOSSEE, IIT Bombay
Email: toolbox@scilab.in
*/
-
+#include <math.h>
+#include <stdlib.h>
#include "logspace.h"
-#include<math.h>
+
void dlogspacea(double *low_limit,int _row,double *up_limit,double range_num,double *out)
{
int i,j,k;
double temp;
- double step_iterate[_row]; /* for each row the spacing between two values is different.*/
+ double *step_iterate; /* for each row the spacing between two values is different.*/
+ step_iterate = (double*) malloc((double)_row*sizeof(double));
for(i=0;i<_row;i++)
{
step_iterate[i] = pow(10,((up_limit[i]-low_limit[i])/(range_num-1)));