I am working on predictive controller which does not require any modulator to apply switching pulses to three phase voltage source inverter. I have to implement predictive controller algorithm in S-function of the matlab. But, i don't know how can i do this?