m0_37753897
m0_37753897
2017-03-14 03:23

我自己不太了解matlab语言,哪位大神能给下面的程序注释一下?感激不尽

10
  • matlab
  • 语言

毕设需要用matlab做人脸识别,下面是一段PCA方法的matlab程序,求注释,,

face_number=1;
max_class=1;
data{face_number,1}=img(:);
prompt={strcat(messaggio,'Class number must be a positive integer <= ',num2str(max_class))};
title='Class number';
lines=1;
def={'1'};
answer=inputdlg(prompt,title,lines,def);
zparameter=double(str2num(char(answer)));
if size(zparameter,1)~=0
class_number=zparameter(1);
if (class_number<=0)||(class_number>max_class)||(floor(class_number)~=class_number)||(~isa(class_number,'double'))||(any(any(imag(class_number))))
warndlg(strcat('Class number must be a positive integer <= ',num2str(max_class)),' Warning ')
else
max_class=2;
data{face_number,2}=class_number;
save('face_database.dat','data','face_number','max_class');
msgbox(strcat('Database was empty. Database has just been created. Image succesfully added to class number ',num2str(class_number)),'Database result','help');
close all;
clear('img')
end
else

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答