matlab - Why does fopen fail the first time, but work the second time? -


i using matlab create new file calling

fid = fopen(filename,'w') 

since filename doesn't exist, should create new file , give me valid file descriptor. instead returns -1. if run code again however, fid = 3.

this being run on ubuntu apparently works fine on windows , can't figure out why.

-mike

not sure if helps, note if folder doesn't exist, fopen 'w' can't create file , returns -1.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -