Spice-accurate circuit simulator on matlab