The Code, I tried solving it:
-
Voltage = str2num(get(handles.sys_volt, 'String'));
Impedance = str2num(get(handles.imp, 'String'));
Theta = str2num(get(handles.angle, 'String'));
It = Voltage/Impedance;
Ir = sqrt((It^2)/(1+(tan(Theta*pi/180)^2)));
Il = Ir*tan(Theta*pi/180);
ActivePower = Voltage*Ir;
InductivePower = Voltage*Il;