Simulating a Flyback converter using Matlab / Simpowersystems, cannot get it to work, any tips?
There may be a couple of things wrong in your picture: -



Firstly, the diode maybe the wrong way round if you are expecting a positive output and secondly the phasing of your transformer may need inverting - try reversing the connections on the secondary - a flyback must have the correct phase relationship between primary and secondary for it to work.

I would also say that your FET appears to be upside down - look at the parasitic diode - it will always be conducting from the battery through the primary.