Matlab finding builtin file before class method file of same name

I am working with an existing code package (Aparat-0.3.1) for speech signal analysis. However, they have created their own filter.m that applies to classes @signal, using different parameters from the normal Matlab filter command.
Currently, when called, Matlab finds the builtin function filter from the below address:
"built-in (C:\Program Files\MATLAB\R2013a\toolbox\matlab\datafun\@single\filter) % single method"
instead of finding the class function @signal/filter.m
What type of command can I use to tell it where to look? I can't be solely in that folder as my main directory as I need to access other folders just a few lines later in my main call file.
In most other scenarios, I do what the normal builtin "filter" command to be the first one found.
Thanks for any assistance you can provide!
--------UPDATES ON CODE-------------
Below is the function call that I am using
g_sm = filter(b_sm,1,g,'noncausal');
%NOTE: this uses @signal filter.m, held in APARAT. Requires the input to be of class signal
--------------------------------------------
Below is the class definition for filter:
function [y,zf] = filter(b,a,X,varargin)
% FILTER One-dimensional digital filter.
% Y = FILTER(B,A,X) filters the data in vector X with the
% filter described by vectors A and B to create the filtered
% data Y.
%
% Y = FILTER(B,A,X,'noncausal') performs noncausal filtering,
% i.e. the time information is shifted to match the mean group delay
% of the filter.
%
% Y = FILTER(B,A,X,'noncausal,'f0',F0) performs noncausal filtering,
% adjusting the time delay to match the group delay at frequency F0.
%
% Y = FILTER(B,A,X,'causal') performs causal filtering (default),
%
% Y = FILTER(B,A,X,'backwards') performs filtering on the time reversed
% signal, i.e. it flips the signal backwards before filtering and flips
% the filtered signal to obtain original time orientation
% $Id: filter.m 127 2007-11-07 14:22:23Z mairas $
----------------------------------------------------
Below is the method definition for signal:
classdef signal < handle
%-------------------------------------------------------------------------
% Class name : signal
%-------------------------------------------------------------------------
% Description : handles basic signal operations and transforms.
---------------------------------------------------
The organization is as follows:
aparat-0.3.1 [sub-folder of overall program]
-> @signal
-->filter.m

Answers (1)

The @signal/filter will only run on an object of type "signal"
I.e.
sig = signal; % Make a signal, however it's done
filter(sig); % this calls the filter method for the class(sig)

2 Comments

The input to my call is an object of class signal, however it sitll isn't finding it. I'll update the above to show.

Sign in to comment.

Asked:

on 26 Jan 2015

Commented:

on 26 Jan 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!