Low Level IO: Closing files Without Using fclose('all')

I am not sure why it still says my files are open when I type fopen all in the command window.
I attached my code. I made sure to close all three 3 files after the line in question is read and I made sure to close the newly created file.
Was wondering if anyone could help. I attached my code.

 Accepted Answer

Nevermind. I found out the problem. I moved the original fopen(file1) and fopen(file2) to within the if statements.
I still don't know why this solved the problem...they shoulld still be all closed anyway in my attached code.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!