Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function regulP(Kp)
- F = tf(1,[1 3 2 1]);
- c = pid(Kp);
- [Y,X] = step(feedback(c*ss(F),1));
- [M,N] = size(Y);
- MatrixY = zeros(M,N);
- for i = Y
- MatrixY = 1 - i;
- end;
- plot(X,MatrixY);
- title('Step Response');
- xlabel('Time [s]') % x-axis label
- ylabel('Amplitude') % y-axis label
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement