MATLAB: Fileparts error

fileparts

If I run on Matlab 2011b, there is an error like that Error using fileparts Too many output arguments.
Is there alternative way to solve the problem?

Best Answer

Are you using some code from a prior version where it could take 4 output arguments? Take note of this note:
Note The fourth output argument of fileparts (file version) is no longer supported and has been removed. Calling the function with more than three output arguments generates a warning and will error in a future version.