Viving Frendiana - Penyelesaian Sistem Transmisi dengan Pemr

40 elif self.ui.satuan_zo_2.currentText() == "Ω": ro elif self.ui.satuan_zo_2.currentText() == "mΩ": ro = rl*10**-3 elif self.ui.satuan_zo_2.currentText() == "µΩ": ro = rl*10**-6 elif self.ui.satuan_zo_2.currentText() == "nΩ": ro = rl*10**-9 elif self.ui.satuan_zo_2.currentText() == "pΩ": ro = rl*10**-12 #operasi perhitungan koefr = ((rl-ro)*(rl+ro)+(ilio)*(il+io))/((rl+ro)**2+(il+io)**2) koefi = ((il-io)*(rl+ro)-(rlro)*(il+io))/((rl+ro)**2+(il+io)**2) koef = complex(koefr,koefi) rp = math.sqrt(koefr**2+koefi**2) rp = round(rp, 7) ip = cmath.phase(koef) ip = (np.degrees(ip)) ip = round(ip, 7) polar = str(rp)+" ∠ "+str(ip)+"°" koef = complex(round(koef.real, 7),round(koef.imag, 7)) daya = round((rp**2)*100, 7) daya1= round(100-daya, 7) swr1 = 1 swr = (((swr1)+abs(rp))/((swr1)-abs(rp))) self.ui.lbl_r1.setText(str(koef)) self.ui.lbl_r2.setText(str(polar)) self.ui.lbl_p1.setText(str(daya)+" %") self.ui.lbl_p2.setText(str(daya1)+" %") self.ui.lbl_swr.setText (str(swr))

RkJQdWJsaXNoZXIy MTM3NDc5MQ==