diff options
author | torset | 2009-02-19 14:12:35 +0000 |
---|---|---|
committer | torset | 2009-02-19 14:12:35 +0000 |
commit | 6bec7e5598ad5cf78e56d82daf5a61f7d87839a8 (patch) | |
tree | d0951a78dd5be3730b9514c5b2d95386a2f133b3 /src/elementaryFunctions/pow/dpowa.c | |
parent | 31ebf3501c23dcd9d9d4b2452e91b6da5623060d (diff) | |
download | scilab2c-6bec7e5598ad5cf78e56d82daf5a61f7d87839a8.tar.gz scilab2c-6bec7e5598ad5cf78e56d82daf5a61f7d87839a8.tar.bz2 scilab2c-6bec7e5598ad5cf78e56d82daf5a61f7d87839a8.zip |
Modify arrays pow : now computes A.^B instead of A.^b, A,B=matrices,b=scalar
Diffstat (limited to 'src/elementaryFunctions/pow/dpowa.c')
-rw-r--r-- | src/elementaryFunctions/pow/dpowa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/elementaryFunctions/pow/dpowa.c b/src/elementaryFunctions/pow/dpowa.c index 454d38de..64e0ca9e 100644 --- a/src/elementaryFunctions/pow/dpowa.c +++ b/src/elementaryFunctions/pow/dpowa.c @@ -12,9 +12,14 @@ #include "pow.h" -void dpowa(double* x, int size, double power, double *out) { +void dpowa(double* x, int size, double* power, double *out) { + /* + Computes Scilab x.^power + Computes power element by element + x and power must have same size + */ int i = 0; for (i = 0; i < size; ++i) { - out[i] = dpows(x[i], power); + out[i] = dpows(x[i], power[i]); } } |