Changeset 181 for aedes_data_read.m


Ignore:
Timestamp:
Dec 16, 2011, 12:16:11 PM (8 years ago)
Author:
tjniskan
Message:
  • Added a workaround for the uigetfile-bug in OSX version of Matlab, where uigetfile in some situations returns a directory instead of a file. This bug seems to be present at least in R2011a version of Matlab.

M aedes_getfilefilter.m
M aedes_data_read.m
M aedes_revision.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • aedes_data_read.m

    r174 r181  
    8080        DATA=[];
    8181        return
    82   end
    83   filename = fullfile(f_path,f_name);
    84   dataformat = aedes_getdataformat(filename);
     82        end
     83       
     84        filename = fullfile(f_path,f_name);
     85       
     86        % There is a bug in uigetfile in OSX version of Matlab and the
     87        % fid-directory may be returned instead of the fid-file.
     88        if ismac
     89                if length(f_name)>3 && strcmpi(f_name(end-3:end),'.fid')
     90                        filename = [filename,filesep,'fid'];
     91                end
     92        end
     93        dataformat = aedes_getdataformat(filename);
     94       
    8595 
    8696elseif nargin>=1
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008