Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to select .dat file to open #28

Open
tangerine2010 opened this issue Jul 30, 2020 · 2 comments
Open

unable to select .dat file to open #28

tangerine2010 opened this issue Jul 30, 2020 · 2 comments

Comments

@tangerine2010
Copy link

matlab vR2020a

when using load button in toolbar on GUI, unable to select .dat file from documents. They all appear light grey and cannot be clicked on, including the .dat files included in initial download file. Can someone please advise as to how to get around this and be able to open .dat files for analysis?

@2718xyzu
Copy link

There is a workaround; the problem is that, in the current version of MATLAB, most Mac OS cannot properly interpret the "uigetfile" command when it is combined with filetype restriction options. If you're sure that you only want to select .dat files, you can make a basic fix by changing the file called load_data.m. Instead of line 4 consisting of a long uigetfile command, delete lines 4-10 (until you get to the closing parenthesis on the uigetfile command) and just use uigetfile('*.*','multiselect', 'on');, then follow it with a line of ftype = 2; This will allow you to select .dat files and have the rest of the code interpret them as such.

It's kind of an inelegant solution, but I hope it works for you.

@2718xyzu
Copy link

@tangerine2010 I should also clarify: what I referred to as "line 4" is really a continuation of line 3. Here's what the beginning of the code should look like for the first few lines:

 function load_data(self, files, ftype)
    if nargin < 2
        [fname, fpath, ftype] = ...
            uigetfile('*.*','multiselect', 'on');
        ftype = 2; %2 to load dat files, 3 to load smd files
        if (ftype == 0)
            return
        end
        if iscell(fname)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants