Changeset 103 for aedes_data_read.m


Ignore:
Timestamp:
Mar 10, 2010, 1:31:15 PM (9 years ago)
Author:
tjniskan
Message:
  • Added support for multiple receivers in aedes_readfid.m
  • Aedes can now read data stored in MAT-file from a variable that starts

with "data" (not case sensitive)

M aedes_data_read.m
M aedes_readfid.m
M aedes_revision.m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • aedes_data_read.m

    r96 r103  
    140140  %% Check variables in the MAT-file
    141141  tmp=who('-file',filename);
    142   if isempty(tmp) || ~any(ismember(lower(tmp),{'data','images'}))
     142  if isempty(tmp) || ~any(strncmpi(tmp,'data',4)) || ...
     143      ~any(strncmpi(tmp,'images',6))
    143144    if showWbar
    144145      delete(h)
    145         end
    146         DATA=[];
    147         error('The MAT-file doesn''t contain the required variable "Data" or "images"!')
     146    end
     147    DATA=[];
     148    error('The MAT-file doesn''t contain the required variable "Data" or "images"!')
    148149  end
    149150 
    150151  % Use the "data" variable by default
    151   ind=find(strcmpi(tmp,'data'));
     152  ind=find(strncmpi(tmp,'data',4));
    152153  if isempty(ind)
    153         % If "data" variable is not found, use the "images" variable
    154         ind=find(strcmpi(tmp,'images'));
     154    % If "data" variable is not found, use the "images" variable
     155    ind=find(strncmpi(tmp,'images',6));
    155156  end
    156157  dataFieldName = tmp{ind(1)};
Note: See TracChangeset for help on using the changeset viewer.

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