Electromagnetic wave advancement and Matlab simulation of electromagnetic components