Trying to Plot feedback system
1 view (last 30 days)
Show older comments
I am trying to plot my g in order to show the overshoot I am getting however I keep getting an error everytime I try to plot and not sure why. I already found my values just cannot plot.
g_0 = tf([20],[1,8,32,20]);
stepinfo(g_0)
g_1 = tf([40],[1,8,32,40]);
stepinfo(g_1)
g_2 = tf([60],[1,8,32,60]);
stepinfo(g_2)
g_3 = tf([70],[1,8,32,70]);
stepinfo(g_3)
g_4 = tf([77],[1,8,32,77]); % K of 77 give overshoot just under 16%
stepinfo(g_4)
g_5 = tf([78],[1,8,32,78]); % K of 78 gives overshoot just above 16%
stepinfo(g_5)
%Interpolate to get exact K value = 16% = 77.66181431
g= tf([77.6618143],[1,8,32,77.6618143]) % K is just over overshoot of 17%
stepinfo(g)
step(g)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/382273/image.png)
0 Comments
Answers (1)
Star Strider
on 15 Oct 2020
The image is a bit difficult to read. The error appears to be thrown with the step call. This may likely be due to your having named a variable ‘step’.
Run this from a script or your Command Window:
which step -all
if the first entry is:
step is a variable.
you have found the problem. The solution is to name it something else that is relevant in the context of your code.
If that is not the problem, please provide more details.
0 Comments
See Also
Categories
Find more on Visualization and Data Export in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!