I am trying to run Octave from the command line. The Octave function uses some functions that are signal processing related (e.g. padarray).
The function version (when run from Octave) runs with no problem. When I run from the command line with the following code, I get the error 'padarray' undefined. How do I get this function to be included?
Here's a simple example of the difference between two pieces of code.
Function
function [] = pad_function()
vec = ones(2,1);
vec = pad_vector(vec);
end
function padded_vector = pad_vector(vec)
padded_vector = padarray(vec,2);
endfunction
Script
#!/usr/local/bin/octave -qf
function padded_vector = pad_vector(vec)
padded_vector = padarray(vec,100);
endfunction
vec = ones(2,1);
vec = pad_vector(vec);