Domanda

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

È stato utile?

Soluzione

Use uigetfile() and fullfile():

[filename, pathname] = uigetfile({'*.*';'*.dat'}, 'Select a dat file...');
fullPath = fullfile(pathname, filename);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top