invoke writeCDFdata

fix some bugs in writeCDFdata from copying from the wrong script
change source from ascii to mat file, invoke writeCDFdata
comment out explicit close file

writeCDFdata loses the file so the call isn't needed anymore
add semicolons