matlab - Unable to read file 'subjFiles(1).name'. No such file or directory -


i'm using codes called specific function. in line 17 of function error

index exceeds matrix dimensions.

error in generateexpreport (line 17) checkpvaluesfield = subjfiles(1).name;

the function line 20 this:

function [] = generateexpreport(copydir,resultdir,params) % syntax  methodnames          = fieldnames(params.methods); nummethods           = length(methodnames);      = 1 : nummethods         cd(resultdir)         numtargets                         = length(params.methods.(methodnames{i,1}).idtargets);         iddrivers                          = params.methods.(methodnames{i,1}).iddrivers;         namefiles                          = [methodnames{i,1} '*.mat'];         subjfiles                          = dir(namefiles);         numsubj                            = length(subjfiles);         significanceondrivers              = zeros(numsubj,numtargets);         matrixtransferentropy              = zeros(numsubj,(numtargets)+1); %         check if pvalues matrix present         checkpvaluesfield                  = load(subjfiles(1).name);         fields                             = fieldnames(checkpvaluesfield);         namefields                         = checkpvaluesfield.(fields{1,1}); 

i can't find problem please me:(( what's wrong

checkpvaluesfield                  = load(subjfiles(1).name); 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -