Error in Assignin with strings
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi Matlab users,
I have to create an cell array: cases = {'mean' 'min' 'max' 'std' 'm3' 'm4' 'm6' 'm8' 'm10' 'm25'} - This is an user input and user will enter : 'mean' 'min' 'max' 'std' 'm3' 'm4' 'm6' 'm8' 'm10' 'm25' , and I would like to use assignin to read it into the workspace. But when I read it into the workspace using strread, i am getting error like this- "Second input must be a filename or string to parse".
assignin('base','cases',strread(get(handles.cases_tag,'string')),'%s','delimiter',' ')
can anyone help how to create an cell array with the user input.
댓글 수: 0
답변 (1개)
Walter Roberson
2012년 4월 28일
assignin('base', 'cases', strread(get(handles.cases_tag,'string'), '%s', 'delimiter', ' '))
That is, you had a ) in the wrong place.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!