EMGLAB FORUM

EMGLAB FORUM >SMR Loading Issue (Matlab 2012a)

  Subject:   SMR Loading Issue (Matlab 2012a)
 
From:   Matt Chardon Date:   21 Sep 2012 8:49 am  
Reply via e-mail to Matt Chardon.  
  Hello Guys,

Just downloaded emglab and get the following error when I try to load an smr file:

%%%%%%

Error using fileparts
Too many output arguments.

Error in read_smr (line 31)
[ePath,name,ext,versn]=fileparts(ePath);

Error in emgfile (line 84)
[chan, info, status] = feval
(reader, 'open', emg_file);

Error in emgdfile (line 15)
[file, chan, status] = emgfile
('open');

Error in emgaction (line 34)
if ~emgdfile ('open'); return; end;

Error in emgevent (line 32)
emgaction ([label, get(cbo,
'tag')]);

Error while evaluating uimenu Callback

%%%%

I am using Matlab 2012a and spike2 7.10

Any suggestions?

Matt
  >> Reply to this message  

  Subject:   Re: SMR Loading Issue (Matlab 2012a)
 
From:   Brice Cleland Date:   11 Oct 2012 12:11 pm  
Reply via e-mail to Brice Cleland.  
  Hello,

I am having a similar problem. It appears that when I am using a Mac, the .smr file is not being recognized by the emglab program. Does anyone have any suggestions on how to fix this problem? Thanks!


Matt Chardon wrote:
>Hello Guys,
>
>Just downloaded emglab and get the following error when I try to load an smr file:
>
>%%%%%%
>
>Error using fileparts
>Too many output arguments.
>
>Error in read_smr (line 31)
> [ePath,name,ext,versn]=fileparts(ePath);
>
>Error in emgfile (line 84)
> [chan, info, status] = feval
> (reader, 'open', emg_file);
>
>Error in emgdfile (line 15)
> [file, chan, status] = emgfile
> ('open');
>
>Error in emgaction (line 34)
> if ~emgdfile ('open'); return; end;
>
>Error in emgevent (line 32)
> emgaction ([label, get(cbo,
> 'tag')]);
>
>Error while evaluating uimenu Callback
>
>%%%%
>
>I am using Matlab 2012a and spike2 7.10
>
>Any suggestions?
>
>Matt
  >> Reply to this message  

  Subject:   Re: Re: SMR Loading Issue (Matlab 2012a)
 
From:   Brice Cleland Date:   11 Oct 2012 3:50 pm  
Reply via e-mail to Brice Cleland.  
  Ok,

I have a simple fix for this problem:

Go to the read_smr file, and locate this code (line 31)
[ePath,name,ext,versn]=fileparts(ePath);
Remove 'versn' from the line, so that it has 3 outputs instead of 4.

The new versions of Matlab (2011 and 2012, I believe) have changed the fileparts function so it does not work with 4 outputs anymore. Thus, you have to change it to 3 outputs.


Brice Cleland wrote:
>Hello,
>
>I am having a similar problem. It appears that when I am using a Mac, the .smr file is not being recognized by the emglab program. Does anyone have any suggestions on how to fix this problem? Thanks!
>
>
>Matt Chardon wrote:
>>Hello Guys,
>>
>>Just downloaded emglab and get the following error when I try to load an smr file:
>>
>>%%%%%%
>>
>>Error using fileparts
>>Too many output arguments.
>>
>>Error in read_smr (line 31)
>> [ePath,name,ext,versn]=fileparts(ePath);
>>
>>Error in emgfile (line 84)
>> [chan, info, status] = feval
>> (reader, 'open', emg_file);
>>
>>Error in emgdfile (line 15)
>> [file, chan, status] = emgfile
>> ('open');
>>
>>Error in emgaction (line 34)
>> if ~emgdfile ('open'); return; end;
>>
>>Error in emgevent (line 32)
>> emgaction ([label, get(cbo,
>> 'tag')]);
>>
>>Error while evaluating uimenu Callback
>>
>>%%%%
>>
>>I am using Matlab 2012a and spike2 7.10
>>
>>Any suggestions?
>>
>>Matt
  >> Reply to this message  

  Subject:   Re: Re: Re: SMR Loading Issue (Matlab 2012a)
 
From:   Jevon Montague Date:   29 Jan 2014 11:55 am  
Reply via e-mail to Jevon Montague.  
  I ran into this same problem except I am running Matlab 2013b on a PC(Windows 8.1). I did the simple fix that Brice suggested for his MAC and now I have an additional error (See below). Any suggestions on how to resolve this?

Error using /
Matrix dimensions must agree.

Error in read_smr (line 168)
scaleFactor=6553.6 /(Info.scale*scaleFactor);

Error in emgfile (line 84)
[chan, info, status] = feval (reader, 'open', emg_file);

Error in emgdfile (line 15)
[file, chan, status] = emgfile ('open');

Error in emgaction (line 34)
if ~emgdfile ('open'); return; end;

Error in emgevent (line 32)
emgaction ([label, get(cbo, 'tag')]);

Error while evaluating uimenu Callback



Brice Cleland wrote:
>Ok,
>
>I have a simple fix for this problem:
>
>Go to the read_smr file, and locate this code (line 31)
>[ePath,name,ext,versn]=fileparts(ePath);
>Remove 'versn' from the line, so that it has 3 outputs instead of 4.
>
>The new versions of Matlab (2011 and 2012, I believe) have changed the fileparts function so it does not work with 4 outputs anymore. Thus, you have to change it to 3 outputs.
>
>
>Brice Cleland wrote:
>>Hello,
>>
>>I am having a similar problem. It appears that when I am using a Mac, the .smr file is not being recognized by the emglab program. Does anyone have any suggestions on how to fix this problem? Thanks!
>>
>>
>>Matt Chardon wrote:
>>>Hello Guys,
>>>
>>>Just downloaded emglab and get the following error when I try to load an smr file:
>>>
>>>%%%%%%
>>>
>>>Error using fileparts
>>>Too many output arguments.
>>>
>>>Error in read_smr (line 31)
>>> [ePath,name,ext,versn]=fileparts(ePath);
>>>
>>>Error in emgfile (line 84)
>>> [chan, info, status] = feval
>>> (reader, 'open', emg_file);
>>>
>>>Error in emgdfile (line 15)
>>> [file, chan, status] = emgfile
>>> ('open');
>>>
>>>Error in emgaction (line 34)
>>> if ~emgdfile ('open'); return; end;
>>>
>>>Error in emgevent (line 32)
>>> emgaction ([label, get(cbo,
>>> 'tag')]);
>>>
>>>Error while evaluating uimenu Callback
>>>
>>>%%%%
>>>
>>>I am using Matlab 2012a and spike2 7.10
>>>
>>>Any suggestions?
>>>
>>>Matt
  >> Reply to this message  

sponsors:
Veterans Affairs Palo Alto Rehabilitation Research and Development Center
|
National Institute of Neurological Disorders and Stroke