fileparts — returns the path, filename and extension for a file path
[path,fname,extension]=fileparts(fullpath) v=fileparts(fullpath,sel)
a character string, the given file path
a optional character string selector, with posible values: 'path' 'fname' or 'extension'
a character string, the path of the directory pointed to by fullpath
a character string, the filename part is any or ''
a character string, the extension part is any or ''
a character string, depending on sel value
[path,fname,extension]=fileparts(fullpath)
splits the
fullpath character string in its three parts: the path of the
directory pointed to, the filename part, the extension part
including the dot.