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
Post a Comment