[Scilab-users] log10 doesn't support hyperarrays

Federico Miyara fmiyara at fceia.unr.edu.ar
Tue Jan 21 09:41:50 CET 2020


Dear all,

I've noticed that log10 doesn't support hyperarrays, while log (natural 
logrithm) does (even if the documantation in both cases says they are 
applicable to vectors and matrices:

a = rand(3,2,2);
b = log(a)
c = log10(a)
d = log(a)/log(10)

--> b = log(a)
  b  =

(:,:,1)

   -0.6847401  -0.0808957
   -1.051648   -0.0525378
   -0.9483546  -1.06847
(:,:,2)

   -0.9781346  -0.6944493
   -0.3091181  -1.3323448
   -1.3410298  -0.6436786

--> c = log10(a)
  c  =

   -0.2973788  -0.0351326
   -0.4567249  -0.0228169
   -0.4118652  -0.4640306

--> d = log(a)/log(10)
  d  =

(:,:,1)

   -0.2973788  -0.0351326
   -0.4567249  -0.0228169
   -0.4118652  -0.4640306
(:,:,2)

   -0.4247984  -0.3015955
   -0.1342483  -0.57863
   -0.5824019  -0.279546

As can be seen, log10 is yielding just the first page.

It's strange, since log10 can be easily obtained from log, but both 
functions are primitives

Regards,

Federico Miyara

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20200121/e566398e/attachment.htm>


More information about the users mailing list