I have a script that uses this line of code:
system(['cat ' inputfile ' | tr -d ''\000'' | tr -d ''\015'' >& tempfile.txt']);
to go through a text file and delete some special characters and then put it into a temp file.
This line of code works in Matlab2012 but not in 2017 as it leads to this error:
tr: Illegal byte sequence
cat: stdout: Broken pipe
Does anyone know how to get around this issue? Thank you!
systemcall and just print out the composed string you pass to it. This will give you a hint as to what is wrong.inputfilecontains spaces? Consider enclosing it in quotes.