Why do I get the errors "Missing operator, comma, or semicolon" and "eval(['dbstop in ' mfile ' at ' num2str(line_num)])"?

2 次查看(过去 30 天)
When I try to run a "stepthru analyze_series8 base" I get the following errors:
??? Error: File: C:\Documents and Settings\Administrator\Desktop\MRI_Brain_Scan\MRI Brain Scan\analyze_series8.m Line: 55 Column: 8
Missing operator, comma, or semicolon.
Error in ==> C:\Documents and Settings\Administrator\Desktop\MRI_Brain_Scan\MRI Brain Scan\StepThru.m
On line 32 ==> eval(['dbstop in ' mfile ' at ' num2str(line_num)])
Here is the code of analyze_series8.m
%%Visualization
%----------------------------------------------------------------------
%explore image data using Image Viewer GUI tool
i = 30; %middle slice
im = squeeze(D(:,:,i));
max_level = double(max(D(:)));
imview(im,[0 max_level])
%custom display - image data
fig1 = figure;
max_level = double(max(D(:)));
imshow(im,[0 max_level])
title('Coronal Slice #30')
set(fig1,'position',[601 58 392 314])
imview close all
The line 55 is the last one showed here "imview close all".
Here is the code from stepthru.m:
while ~feof(fid) %read 1 line at-a-time
dummy=NoLeadingBlanks(fgetl(fid));
line_num=line_num+1;
if length(dummy)>0 %nonempty line
if dummy(1)=='%' & line_num>1 %comment line but not line1
if strfind(lower(dummy),'nobkpt') %no breakpoint this line
eval(['dbclear in ' mfile ' at ' num2str(line_num)])
else
eval(['dbstop in ' mfile ' at ' num2str(line_num)])
end
end
end
end %file empty
fclose(fid);
The line 32 is the following: "eval(['dbstop in ' mfile ' at ' num2str(line_num)])".
Please help me here!!
This is a code available for downloading at mathworks.com: the MRI Brain Segmentation By Robert Bemis

回答(1 个)

Rob Graessle
Rob Graessle 2011-4-17
If you look at the submission's page on the File Exchange, the author says this:
"Note for users who get stuck by the IMVIEW error. That function was replaced by IMTOOL (years ago). In analyze_series8.m just replace all occurrences of "imview" with "imtool" (and save)."
I think this may fix the error you're getting.

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by