0

I have seen the following form of writing in many matlab routines:

for example, I have a system function

num=1;
den=[1 0 0];
sys=tf(num,den)

If I want to show the step response, or bode plot, I just type

step(sys);
bode(sys);

This I understand.

But I also see another form of writing:

step(num,den);
bode(num,den);

This is an example of stem(num,den)

This is another example of bode2(num,den)

The question is, for the second form, what is the definition of this syntax? I haven't found any detailed explanation of it. I mean, can we use (num,den) to replace sys=tf(num,den)? If so, where can I find some official explanation? Please help! Thanks.

Jonas
  • 121,568
  • 97
  • 310
  • 388
zymaster
  • 3
  • 3
  • 3
    This question is very hard to answer, you've cited some syntax without any source, and asked why that syntax is used. In short, we probably have no idea and no way to infer it without more context about where you saw that. It could have been in a piece of code where a custom `step` or `bode` function was defined. It could have been a different programming language. Please [edit] your question to include more context / [mcve]s – Wolfie Jan 05 '23 at 08:24
  • I've never seen calls to ```step``` and ```bode``` done like that. – picchiolu Jan 05 '23 at 08:25
  • If its not in the documentation pages of MATLABS `step` and `bode`, its not correct. If it is, its there. – Ander Biguri Jan 05 '23 at 09:23
  • as you can see in this web: https://www3.diism.unisi.it/~control/ctm/extras/step.html – zymaster Jan 05 '23 at 12:57
  • There are some examples use step(num,den) – zymaster Jan 05 '23 at 12:57
  • Many of them in this page – zymaster Jan 05 '23 at 12:57
  • Also you can see the bode2(num,den) in this page:http://web.mit.edu/16.060/matlab/bode2.m – zymaster Jan 05 '23 at 12:58
  • 1
    As correctly pointed out in @Stewie Griffin m’s answer, the code you are pointing at to was used with a relatively old version of Matlab. The current syntax is different. – picchiolu Jan 05 '23 at 16:58

1 Answers1

2

The code you use as an example is written in 1994. This syntax is no longer in use.

Try using the current versions of step and bode.

Stewie Griffin
  • 14,889
  • 11
  • 39
  • 70