bode function plot Help
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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 comentarios
  Ameer Hamza
      
      
 el 19 de Mzo. de 2020
				The line
s = tf('s')
is correct in MATLAB's syntax. Which version of MATLAB are you using?
Respuestas (1)
  Fangjun Jiang
      
      
 el 19 de Mzo. de 2020
        
      Editada: Fangjun Jiang
      
      
 el 19 de Mzo. de 2020
  
      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 comentarios
  Fangjun Jiang
      
      
 el 19 de Mzo. de 2020
				Well, you need purchase, download and then install from the Mathworks website.
Ver también
Categorías
				Más información sobre Get Started with Control System Toolbox en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


