Fixed denseSMF.m