Why does my Command Window show different variables then my workspace?
이전 댓글 표시
I am creating a gui and I have some nested functions which are called from the GUI callback functions. One is called validateFolder(handles, source). When I debug inside this function, I expect to see the function variables only. When I put the breakpoint at the top of the function, I should see handles and source in the workspace, and nothing more. When I use whos in the command winodw, that is what I see. But my workspace, which indicates that its displaying the workspace for the validateFolder() function, shows a different set of variables. Note that this problem is not isolated to this script (it happens in other programs I write too). See screen shot of function, command window, and workspace below:

Here is the full code from the function:
function handles = validateFolder(handles, source)
dataFolder = handles.folders.dataFolder;
isMissing = missingFiles(dataFolder, source);
if ~isMissing
set(handles.gui.btn_load, 'enable', 'ON');
set(handles.gui.rb_fromraw, 'enable', 'ON', 'value', 1);
message = ['Ready to load data from: ' source.studentInfo];
displayMessage(message, handles.gui.message_statusA, [.04 .4 .26]);
else
files = struct2cell(source);
set(handles.gui.btn_load, 'enable', 'OFF');
message = ['Curent Data Folder has no valid source file - add ' files{isMissing}];
displayMessage(message, handles.gui.message_statusA, 'red');
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!