- EnvDir has some incorrect value
- The file 'Envelope_F.mat' is not in the MATLAB path
Hi I'm trying to run this code right now but it shows "Not enough input arguments" and "Error in GetData (line 13): load([EnvDir 'Envelope_F.mat'],'Envelope_F');"
조회 수: 1 (최근 30일)
이전 댓글 표시
function [stimSet, respSet, stimUnatt] = GetData(EnvDir, EEGDataDir)
% Loading proposed EEG data and speech envlope data
% Inputs:
% EnvelopeDir - the extracted envlope directory
% EEGDataDir - EEG dir for one subjesct
% Outputs:
% stim - set of stimuli [cell{1,trials}(time by features)]
% resp - set of neural responses [cell{1,trials}(time by channels)]
% stimUnatt - set of unattended envlope [cell{1,trials}(time by
% features)]
% load speech envelope data
load([EnvDir 'Envelope_F.mat'],'Envelope_F');
load([EnvDir 'Envelope_M.mat'],'Envelope_M');
댓글 수: 0
답변 (3개)
Shravan Kumar Vankaramoni
2021년 12월 9일
Hi,
Your function 'GetData' expects two input arguments. You need to give exactly two inputs otherwise, it will give that error 'Not enough input arguments'.
If your error is in this line:
load([EnvDir 'Envelope_F.mat'],'Envelope_F');
There are two possibilities:
Refer the below link
댓글 수: 0
yanqi liu
2021년 12월 30일
yes,sir,this is function,so please check the parameters,or set the default parameters, such as
function [stimSet, respSet, stimUnatt] = GetData(EnvDir, EEGDataDir)
% Loading proposed EEG data and speech envlope data
% Inputs:
% EnvelopeDir - the extracted envlope directory
% EEGDataDir - EEG dir for one subjesct
% Outputs:
% stim - set of stimuli [cell{1,trials}(time by features)]
% resp - set of neural responses [cell{1,trials}(time by channels)]
% stimUnatt - set of unattended envlope [cell{1,trials}(time by
% features)]
% load speech envelope data
if nargin < 1
EnvDir = './';
end
load([EnvDir 'Envelope_F.mat'],'Envelope_F');
load([EnvDir 'Envelope_M.mat'],'Envelope_M');
댓글 수: 0
Walter Roberson
2021년 12월 30일
You cannot run that function by pressing the green Run button; you must pass in at least one parameter, either by calling it in code or by going to the command line and typing in a call as a command.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!