Hello guys! I'm new in matlab and need some help. I want to make two graphics of these equations below , to see how P and Q behave when teta varies between -180 to 180 degrees.
P = ((Vs * Vr) / Z) * sin (theta);
Q = (((Vs * Vr) / Z) * (1-(cos (theta)));
Where
Vs = Vrln+(Ir*cos(thetar)+ j (Ir*sin(thetar)))*Z
Vr = Vsln-(Is*cos(thetas)+ j (Is*sin(thetas)))
theta = thetas – thetar
The values of Vsln, Vrln and Z are complex numbers with imag and real parts. I know is needed a loop for the teta var, but how i do that, and plot the graphics?
clcclear% Cálculo das Variáveis y e z
prompt = 'Digite o Comprimento da linha em km: ';l = input(prompt);prompt = 'Digite o Valor de Z em ohms: ';za = input(prompt);prompt = 'Digite o Valor de X em ohms: '; xa = input(prompt); z = complex(za,xa);prompt = 'Digite o Valor de C: ';C = input(prompt); j1 = 2*pi*60*C; y = complex(0, j1);%Cálculo para comprimento total da linha
Z = z*l; disp('O valor de Z será:') disp(Z);Y = y*l; disp('O valor de Y será:') disp(Y);%Cálculos LT Curta
prompt = 'Digite a Tensão de funcionamento da linha em kV: '; Vs = input(prompt);prompt = 'Digite a Tensão no receptor em kV: '; Vr = input(prompt);Vrln = (Vs/(sqrt(3))); disp('O valor de Vr(l-n) será'); disp(Vrln);Vsln = (Vr/(sqrt(3))); disp('O valor de Vs(l-n) será'); disp(Vsln);Is = (Vs-Vr)/Z; disp('O valor de Is será'); disp(Vrln); %Loop potência variando o ângulo no receptor
syms ang P=((Vsln*Vrln)/Z)*sin(ang);
Best Answer