matlab programming trial with electric design and simulation