Patent ID: 8768421

Claim:
An electronic device, comprising: a first main body; a second main body, comprising at least one antenna and a matching unit and disposed on the first main body through a hinge, the second main body being adapted for being opened or closed relative to the first main body; a sensing unit disposed on the electronic device, detecting a distance between the first main body and the second main body, and generating a control signal according to the distance; and a processing unit electrically connected to the sensing unit and the matching unit and adjusting the matching unit according to the received control signal, wherein, the distance comprises an angle between the first main body and the second main body; the processing unit determines whether a setting of the matching unit is an optimizing impedance matching circuit according to the angle; and wherein if the matching unit is not the optimizing impedance matching circuit, the processing unit retrieves the optimizing impedance matching circuit of the matching unit that corresponds to the angle, generates the control signal according to the angle, and transmits the control signal to the matching unit to adjust the setting of the matching unit, such that the antenna has the best performance.