MATLAB Answers

HOW TO CONVERT AN .OUT FILE TO .TXT FILE VIA MATLAB

58 views (last 30 days)
Ivan Michael
Ivan Michael on 28 Sep 2019
Commented: Ivan Michael on 29 Sep 2019
Hello
Does anybody knows how to convert an .out file to .txt file via Matlab?

  0 Comments

Sign in to comment.

Accepted Answer

dpb
dpb on 28 Sep 2019
Edited: dpb on 29 Sep 2019
There's nothing about the file content that is specific to the name including the extension.
fn='yourfile.out';
[~,f]=fileparts(fn);
movefile(fn,[f '.txt'])

  8 Comments

Show 5 older comments
dpb
dpb on 29 Sep 2019
Or more simply use the OS and just
!ren A*.out *.txt
Thanks for the catch on the new extension, Walter, I totally missed that part of the cleanup where I had pasted in the first name again...did fixup the Answer for posterity.

Sign in to comment.

More Answers (0)

Sign in to answer this question.