How to call a file without extension?
51 views (last 30 days)
Hello, I wanted to ask about how you could call a Matlab file extension in name only , ie without the extension. For example, if I have a process or file " ejemplo.xml " , " ejemplo.wav " ... And I want to name , upload or read the file name "example" . For example , I want to process the following, using only the name "example" .
I have this file: " nombre.wav "
function res = function ( " name")
Or with a " audio.wav " file , use only the filename "audio" to create another name with that information.
Thanks in advanced.
Adam on 17 May 2016
[pathstr,name,ext] = fileparts(filename);
breaks up a filename into component parts, including the name and the extension. I'm not really sure what you are asking, but if you get the 'name' part out of that then you can use this and it will be separated from the path and the extension.