bode function plot Help

조회 수: 4 (최근 30일)
Jackson
Jackson 2020년 3월 19일
댓글: Fangjun Jiang 2020년 3월 19일
I am trying to use the bode function on Matlab. The function i am trying to type in Matlab is H(s) = 10s/ (s+2).
This is my code
close all
clear all
s = tf('s')
H= 10*(s) /(s+2) ;
bode(H)
grid
x=1
The bottom is the error I keep getting.
Undefined function 'tf' for input arguments of type 'char'.
Error in Untitled (line 4)
s = tf('s')
How would i fix this?
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2020년 3월 19일
The line
s = tf('s')
is correct in MATLAB's syntax. Which version of MATLAB are you using?
Jackson
Jackson 2020년 3월 19일
I am using MATLAB2019b

댓글을 달려면 로그인하십시오.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2020년 3월 19일
편집: Fangjun Jiang 2020년 3월 19일
You may not have the Control System Toolbox, which is required for having tf().
Run "ver control" to find out
>> H=tf([10,0],[1,2])
H =
10 s
-----
s + 2
Continuous-time transfer function.
  댓글 수: 4
Jackson
Jackson 2020년 3월 19일
How do I install the Control System Toolboxs to MAtlab?
Fangjun Jiang
Fangjun Jiang 2020년 3월 19일
Well, you need purchase, download and then install from the Mathworks website.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by