invalid file name in matlab when using file split

Posted by klijo on Stack Overflow See other posts from Stack Overflow or by klijo
Published on 2012-04-03T17:08:13Z Indexed on 2012/04/03 17:29 UTC
Read the original article Hit count: 217

Filed under:

here jj will be the value of FN, but the trouble is iam getting a error message

??? Error using ==> fopen Invalid filename.

DirName  = 'Samples\mattest\jj';
FileName = split('\\',DirName);

[a,b] = size(FileName);
FN = FileName(b);

file_1 = fopen(FN,'w');

split method was found at http://www.mathworks.com/matlabcentral/fileexchange/4873

Doesnt the code seem correct ? Could someone please help me ?

© Stack Overflow or respective owner

Related posts about matlab