# For statement to find angle from real axis to imaginary plane?

8 views (last 30 days)
Robert Flores on 27 Sep 2018
Commented: KSSV on 27 Sep 2018
Hello everyone,
I was wondering if it is possible to make a for statement, such that I can find the angle between my imaginary points and the real axis. If you are able to help great! Below is a copy of the code. Also, I have attached a figure of my output graph.
-Robert
CODE:
clc,clear all,close all
Tz = 0.4;
for KP = [0.9549 4 6.5463];
t=0:0.001:5;
num=[2*KP *Tz 2*KP]
den=[1 2+2*KP *Tz 2*KP];
step(num,den,t);
hold on;
end
legend('k1','k2','k3');
xlabel('Time')
ylabel('y(t)')
title('Unit-Step Responses of the System')
clear all
figure(2)
for KP=[0.9549 4 6.5463];
Tz =0.4;
num=[2*KP *Tz 2*KP];
den=[1 2+2*KP *Tz 2*KP];
rlocus(num,den);
hold on;
end
legend('k1','k2','k3');
xlabel('Real')
ylabel('Imaginary')
title('Unit-Step Responses of the System')

#### 1 Comment

KSSV on 27 Sep 2018
Question not clear...angle between what and what? What variables?