In this paper, semi-analytical generalized matching point technique (GMT) is investigated in order to study the interaction between electromagnetic wave and nanostructures. GMT code is developed in MATLAB software. To validate the code, both analytical Mie theory and semi-analytical GMT method are applied simultaneously for simulating scattered field from dielectric cylinder and a gold nanowire in vacuum which are both illuminated by a TM polarized plane wave. It can be seen that the agreement between both techniques is excellent. It is turned out that nanojet in dielectric micro-cylinder and localized surface plasmon (LSP) in gold nanowire are formed which both Mie and GMT techniques predict the same result.