added bag to matlab conversions and plotting