Recently, I needed to work in Octave. I got stuck when I needed to pass the function argument cell array “varargin” to another function. It turns out that doing this is a little tricky and requires a little thinking to do so as the other function generates its own cell array. I found a quick and easy solution to this problem – use the wildcard “:” to index all elements of the cell array “varargin” that you need to pass on.

function [] = A(varargin)
B(varargin{:});

end

The job was done!!