I was using blob to write a file with javascript in the client side. Following is the code snippet I used:
var blob = new Blob(['hello'], {type: "text/plain;charset=utf-8"});
saveAs(blob, "path.m");
Unfortunately, there is a junk character at the beginning of the file as flagged by Matlab:
I don't know what this character is and how Blob is introducing them. But I need to fix it before I can generate an actual matlab .m file.
I request anybody who knows how to fix this to help me.
Thanks.