Why am I getting athe error ??? Cell contents reference from a non-cell array object?
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
This is my code:
user_entry_monkey = lower(input('Monkey name? (a / e) ','s')); switch user_entry_monkey case 'a'; monkey='Ashley'; case 'e'; monkey='Eta';
end
disp(monkey)
M=monkey(1,1);
% date=datestr('yymmdd'); %Need working date string for loop
datafolder = uigetdir('','Select directory to analyze'); cd(datafolder) file_spec = [datafolder, '\', monkey, '\Data\', M '*.mat']; filelist = dir(file_spec); n_files = length(filelist);
for f=1:n_files fname{f,1}=filelist{f}.name;
The first condition under the for loop is where I get the error. I'm pretty sure it's a syntax problem but I'm not sure how to correct it. I'm running R2010a. Help?
댓글 수: 0
답변 (1개)
Fangjun Jiang
2011년 6월 14일
0 개 추천
fname{f,1}=filelist(f).name;
Also, you might want to use this function fullfile()
댓글 수: 0
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!