필터 지우기
필터 지우기

what is this illegal use of the end in face recognition

조회 수: 2 (최근 30일)
uday
uday 2013년 7월 14일
when iam trying to execute the face recognition code it is showing me the error '**illegal use of the end** 'what is this .if any one have experience in this project iam ready to send you the code help me out plz....
  댓글 수: 2
Jan
Jan 2013년 7월 14일
Posting the relevant part of the code would give us the chance to answer without guessing the details.
uday
uday 2013년 7월 16일
Q=imread('r6.jpg');
imginp=double(reshape(Q,64,1));
disp (' ');
disp ('Simulating SOM neural network for the input image...');
disp (' ');
msx=sim(net,imginp)
msxm=find(msx);
%classification and displaying output
disp (' ');
disp ('Classifying the subject in input image with the matched image in the training database...');
disp (' ');
ans=find((sm - msxm)==min(abs((sm-msxm))));
if (ans > 0) & (ans <= 5)
disp('Subject is identified to be: rock');
else if (ans > 5) & (ans <= 10)
disp('Subject is identified to be: hulk');
else if (ans > 10) & (ans <= 15)
disp('Subject is identified to be: bob');
else if (ans > 15) & (ans <= 20)
disp('Subject is identified to be: banda');
else
disp('Subject is not identified in the training database.');
end
end
end
end
end
when i try to execute it iam getting the following error y this is happening?
??? Error: File: C:\MATLAB7\work\trainsimsom.m Line: 63 Column: 1
Illegal use of reserved keyword "end".

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2013년 7월 14일
편집: Matt J 2013년 7월 14일
You are not allowed to use "if", "else", "elseif", or "end" as variable names, e.g.
>> if=1,
if=1,
|
Error: The expression to the left of the equals sign is not a valid target for an assignment.
>> elseif=2
elseif=2
|
Error: Illegal use of reserved keyword "elseif".
>> else=3
else=3
|
Error: Illegal use of reserved keyword "else".
>> end=4
end=4
|
Error: Illegal use of reserved keyword "end".
  댓글 수: 1
uday
uday 2013년 7월 16일
thanks for your reply.but i did't declare end as a variable...

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by