Error: unable to resolve the name
86 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have some code which generates a variable name iteratively in a loop, It was working fine but now I get the error: unable to resolve the name 'pre1min.windowchunkIdx'.
preORpost = {'pre' 'post'}
all_type_ALL = []; %output for all voc types for all ppts
%load raw data
for pOp = 1:length(preORpost)
for min = 1:2
%window = [preORpost{pOp} num2str(min) 'min'];
varName = [preORpost{pOp} num2str(min) 'min']; % Generate variable name
fieldName = 'windowchunkIdx'; % Generate field name
windowchunk = eval([varName '.' fieldName]);
1 Kommentar
Akzeptierte Antwort
Kunal Kandhari
am 21 Mai 2024
The error, "Unable to resolve the name 'pre1min.windowchunkIdx'." suggests that the variable 'pre1min.windowchunkIdx' (or other similar variables) does not exist in the current workspace or does not have the expected structure. To address this, you need to ensure that these variables are loaded correctly and have the expected fields.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!