Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

quick Matlab7 question

Not open for further replies.


Newbie level 3
Sep 12, 2006
Reaction score
Trophy points
Activity points
This should be easy for anyone who knows this program. How do you create a transfer function on Matlab7? It used to be T=tf(num,den) but now that doesnt work. I know its a stupid question but i just cant find the answer. Also does any one know how to create a variable that stays a variable? for example it used to be (i think) vars x. but now i cant use a global or local variable without setting it equal to a integer. Thanks for any help.

you can find impulse respose of system...
impulse respose of system=Transfer function.....:D:D

variables do not need to be "declared" in the traditional sense.. for example if you want to set variable a to 12 and b to "abcd", you don't have to declare 'a' as and integer and 'b' as a string... just

a = 12; b = 'abcd'

will do.. also, as far as i know (and others correct me if i am wrong), all such variables have global scope within an .m file. usually, different functions go into different .m files (that is how i've always used it).

i've used the tf function before it has worked.. so i am not sure what it is that you are trying to do... if you are trying to plot the impulse response or something you might want to look up the 'impulse' function in matlab.. try 'help impulse' .. another function i've found useful is the filt function... you might want to look that one up as well..

anyway, hope you find this helpful..


If num and den are valid vectors, then the line T = tf(num, den); is valid. May the source of your program is somewhere else. Could you post your code (or a snippet, if the whole code is big) and the error message that Matlab gives you (or expected results and actual results)?

T = tf(num, den); still works on matlab7, post the "error" msg that you are getting from matlab.

another way to make a tf is with the command zpk (zero, pole, gain) you have to give the parameters as vectors

Not open for further replies.

Part and Inventory Search

Welcome to