On 02/12/2018 09:29 AM, behindvampire wrote:

> Hi all,I am new to this octave world so please bear my foolish question.i am

> trying to find the natural log value of 2 but the value it generate is

> 500.

Normally, log() is the function:

octave:1> which log

'log' is a built-in function from the file libinterp/corefcn/mappers.cc

octave:1> log(2)

ans = 0.69315

but you can define your own data array called log() which will then

shadow the log() function:

octave:2> log(1)=1

log = 1

octave:3> log(2)

error: log(2): out of bound 1octave:3> log(e)

error: log(2.71828): subscripts must be either integers 1 to (2^31)-1 or

logicals

octave:3> which log

'log' is a variable

If you can remember defining data that shadows the log() function,

great---if not, it could be some code that is automatically loaded in

your environment and it would require some investigation to figure out

where it's coming from.

-----------------------------------------

Join us March 12-15 at CERN near Geneva

Switzerland for OctConf 2018. More info:

https://wiki.octave.org/OctConf_2018-----------------------------------------