I am using a butterworth filter (scripted below) and the script jams with this error response

1 view (last 30 days)
[b,a] = butter(4,10/120,'low');
Undefined function or variable 'RTROx'.
Error in angle (line 26) RTROx = filtfilt(b,a,RTROx);
This script ran fine on o 2011 version. I downloaded 2012 with signal processing toolbox - so think I have all that I need, but am left to wonder why the error...

Accepted Answer

Honglei Chen
Honglei Chen on 28 Jun 2012
Hi Katherine,
Is the result of
which butter
same for both installations? It sounds like you have a custom butter on path.
  2 Comments
Katherine Whitcome
Katherine Whitcome on 28 Jun 2012
Hi and thanks for your reply.
I do get the same result for both installations:
/Applications/MATLAB_R2011b.app/toolbox/signal/signal/butter.m
Honglei Chen
Honglei Chen on 28 Jun 2012
Edited: Honglei Chen on 28 Jun 2012
That's weird. I don't think butter calls filtfilt at all. It looks like RTTOx is not defined. Are you sure the error is thrown by the butter command?
BTW, in the future you may want to wait till the problem resolved to accept the answer. The accepted answer suppose to be the answer that solves your issue.

Sign in to comment.

More Answers (1)

Star Strider
Star Strider on 28 Jun 2012
I suggest:
which angle
as well. The 'angle' function I know and love takes a complex argument and computes a phase angle from it. To the best of my knowledge, it doesn't call 'flitfilt' either.

Community Treasure Hunt

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

Start Hunting!