Boron neutron capture therapy (BNCT) is a more efficient cancer treatment method compared to direct radiation therapy using charged particles such as protons or carbon beams. Particularly, accelerator-based BNCT (AB-BNCT) is attracting attention due to easy construction in a hospital. The Korea Institute of Radiological & Medical Sciences (KIRAMS) has constructed an injection system for an electrostatic AB-BNCT accelerator and commissioned 30 keV H− and 5 keV D− ion beam facilities. The beam characteristic parameters and Twiss parameters should be confirmed experimentally, and various methods have to be applied for the related measurements. In this study, the linear matrix formalism is used as a technique to measure the beam characteristic and Twiss parameters by varying the magnetic field strength of a solenoid in the beam line. To confirm the validity of this method, a multi-particle tracking code was executed. The simulation results confirm that the proposed method is effective for extracting Twiss parameters. After verification via the multi-particle tracking code, the method was applied to perform experimental measurements. Notably, the method accurately obtains the transverse beam emittance within reasonable uncertainty levels. Thus, our results show that the proposed method is a convenient technique for extracting the Twiss parameters indirectly. The results of the Twiss parameter measurement can potentially be more precise if other aspects, such as the quadrupole magnetic field strength, are incorporated.