Zer0
Zer0

Reputation: 2231

MATLAB fopen to open a file which doesn't have a file extension

I have a file called lol on C:\. So when I run fopen('C:\lol','a'); to open the file, MATLAB can't open it. I think it's looking for a .txt or .m file extension.

How do I open this file in append mode as I want to append data to the file?

Upvotes: 0

Views: 2504

Answers (2)

Veridian
Veridian

Reputation: 3657

Try turning on file extensions. Why can't you just change the format of the file to a .txt or whatever format you want.

Upvotes: 0

Jacob
Jacob

Reputation: 34621

You probably don't have UAC (user access control) to create/modify files in C:\. Try some "safe" location like your Desktop.

Upvotes: 2

Related Questions