Viving Frendiana - Penyelesaian Sistem Transmisi dengan Pemr

59 self.ui.pushButton.clicked.connect(self.compute ) self.show() def compute(self): P1 =self.ui.doubleSpinp1.value() P2 =self.ui.doubleSpinp2.value() P3 =self.ui.doubleSpinp3.value() P4 =self.ui.doubleSpinp4.value() couplingfactor = -10*math.log10(P4/P1) directivity = -10*math.log10(P3/P4) isolation = -10*math.log10(P1/P3) couplingloss = 0 if (P1>P4): couplingloss = -10*math.log10(1- (P4/P1)) if (P1<P4): couplingloss = 1 insertionloss = - 10*math.log10((P2/P1)+(P3/P1)+(P4/P1)) self.ui.lineEditc.setText(str(couplingfactor)+" dB") self.ui.lineEditd.setText(str(directivity)+"dB" ) self.ui.lineEditi.setText(str(isolation)+"dB") self.ui.lineEditcl.setText(str(couplingloss)+"d B") self.ui.lineEditil.setText(str(insertionloss)+" dB") if __name__=="__main__": app = QApplication(sys.argv) w = MyForm() w.show() sys.exit(app.exec_()) Cara Menjalankan Program Slotted Line 1) Memasukan nilai yang diketahui seperti:  λ : Jarak antar minima dikali 2  Z0 : Impedansi Karakteristik (biasanya 50 Ω)

RkJQdWJsaXNoZXIy MTM3NDc5MQ==