why do i receive error while evaluating UIcontrol Callback?
이전 댓글 표시
load ('db');
Ftrain=db(:,1:2);
Ctrain=db(:,3);
for(i=1:size(Ftrain,1))
dist(i,:)=sum(abs(Ftrain(i,:)-Ftest)):
end
try to retrieve results from db but it shows "Error while evaluating UIcontrol Callback"
댓글 수: 8
Voss
2023년 1월 21일
Please share the complete error message.
NUR AINA BATRISYIA
2023년 1월 21일
Voss
2023년 1월 21일
Please copy and paste all the red text from the command window.
NUR AINA BATRISYIA
2023년 1월 21일
Voss
2023년 1월 21일
Thank you. The error says that the variable "im" has not been defined before you try to use it here:
Ftest=FeatureStatistical(im);
Please share the complete code for the function btn_recog_Callback.
NUR AINA BATRISYIA
2023년 1월 21일
Voss
2023년 1월 21일
If "im" is defined in another function, you have to do something to make it accessible in this function, e.g., put it in the handles structure.
Jan
2023년 1월 22일
This looks strange:
db=db.mat;
load db;
In the first line, db.mat extracts the field 'mat' of the struct called 'db'. The line
load db
is equivalent to the functional form:
load('db')
which adds '.mat' automatically. This might work by accident in your case. Most likely you mean:
db = 'db.mat';
load(db);
This looks similar, but has important differences.
After
Ftest=FeatureStatistical(im);
failed, because im is not a defined variable inside the current function, the line
db=db.mat;
will fail, because db is not a known variable also.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
