Undefined function or method 'tf' for input arguments of type 'double'.

on 12 Feb 2013

Jan Simon (view profile)

Hi..

i am using MATLAB R2007 version in my PC.

i tried to define a transfer function from the following command..

a = tf([5],[0.8 1])

but my command window is showing an error like......

" Undefined function or method 'tf' for input arguments of type 'double'."

requesting you to help me on this issue...

``` Regards
venkatapathi.p```

Products

Jan Simon (view profile)

on 12 Feb 2013

The error message is clear: "Undefined function or method 'tf' for input arguments of type 'double'." This mean, that there is no TF function defined for doubles. Even clearing will not change this. The found @dfilt\tf function is obviously defined for dfilt objects.

The call a = tf([5],[0.8 1]) is only possible, if you have the Control System Toolbox, see: http://www.mathworks.com/help/control/ref/tf.html

Azzi Abdelmalek (view profile)

on 12 Feb 2013
Edited by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 12 Feb 2013

Try

```clear tf
a = tf([5],[0.8 1])
```

% You, probably used tf as a variable in your script, or you don't have a system control toolbox

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 12 Feb 2013

Exact. Then, what does mean

` "C:\Program Files\MATLAB\R2007\toolbox\signal\signal\@dfilt\tf.m.`

I mean, tf can be defined differently for two toolbox?

Venkatapathi

Venkatapathi (view profile)

on 12 Feb 2013

Hi azzi..

even i got the same error message after clearing the tf..

Jan Simon

Jan Simon (view profile)

on 12 Feb 2013

@Azzi: This means, that there is a TF function for dfilt objects. The same happens, if you add a function in a subfolder like @uint32\strcmp.m. Then calling strcmp(uint32('a')) calls this user-defined function instead of Matlab's builtin STRCMP.