Pregunta

I am working on Motion Sensor. The sensor reads data and the MATLAB code saves it in hard disk on specific location. Now, I need to add the functionality on my MATLAB GUI which shows the location of the file that is stored on hard disk.

e.g. the file name "xyz.dat" is stored in "D:\". the MATLAB function uigetdir will not work here I think.. Is there any other matlab defined function to access it ?

Kind Regards,

Farhan

¿Fue útil?

Solución

Use uigetfile() and fullfile():

[filename, pathname] = uigetfile({'*.*';'*.dat'}, 'Select a dat file...');
fullPath = fullfile(pathname, filename);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top