error running sys=tf()
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
i wa having trouble running sys=tf() resulting in an error and the line the code is in displaying in my command window. My code is below. Could you help me?
Y=10;
U= [1,3,10];
sys= tf(Y,U);
[y,t]=impulse(sys,5);
plot(t,y);
xlabel('Time (s)');
ylabel('Amplitude');
title('Problem 3');
grid on;
command window
Error in prob3 (line 3)
sys= tf(Y,U);
Resolved:
Apparently I didn't have the controls toolbox downloaded.
2 Commenti
Dave B
il 9 Set 2021
Modificato: Dave B
il 9 Set 2021
This seems to run okay to me, is it possible that you have a tf variable defined? Or maybe a different tf function on your path (which tf should report matlab\toolbox\control\ctrlmodels)? clear all might be helpful. Or maybe you don't have this toolbox? I don't see what the error is, did MATLAB not give a little more info?
Y=10;
U= [1,3,10];
sys= tf(Y,U);
[y,t]=impulse(sys,5);
plot(t,y);
xlabel('Time (s)');
ylabel('Amplitude');
title('Problem 3');
grid on;
Risposte (0)
Vedere anche
Categorie
Scopri di più su Downloads in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
