0
votes

I am using log2 function in Octave to calculate log2 values of a simple array.

>> x = [1:5]
x =

   1   2   3   4   5

>> log2(x)
error: invalid use of script D:\All_Data\my_data\backup3\backup3\tech\DSP\log2.m in index expression

I am not sure why Octave is bailing out with error in this case ...

1

1 Answers

5
votes

You probably have a script that is called log2.m in your running directory, which prevents octave from calling its own log2 function.

I assume that is the case because D:\All_Data\my_data\backup3\backup3\tech\DSP\log2.m doesn't look like a path where standard octave library functions would be installed.

I recommend changing the name of the script in your running directory.