One commonly used mathematical equation for calculating switching losses in inverters is the following:
$$P_{SW} = \frac{1}{2}C_{oss}(V_{sw})f_{sw}V_{sw}^2$$
where $P_{SW}$ is the switching loss ($(W)$), $C_{oss}$ is the output capacitance of the MOSFET at a certain voltage and temperature ($(F)$), $V_{sw}$ is the voltage drop across the MOSFET during switching ($(V)$), and $f_{sw}$ is the switching frequency ($(Hz)$).
To define this equation in MATLAB, you can create a function that takes the input parameters and returns the switching loss:
main.m113 chars4 lines
You can then call this function with your specific parameter values to calculate the switching loss for your inverter.
gistlibby LogSnag