push button in gui
古いコメントを表示
im new in matlab gui can someone help me how to run this function in pushbutton gui...
function load_database1();
% We load the database the first time we run the program.
persistent loaded;
persistent w;
if(isempty(loaded))
v=zeros(10304,70);
for i=1:7
cd(strcat('s',num2str(i)));
for j=1:10
a=imread(strcat(num2str(j),'.pgm'));
v(:,(i-1)*10+j)=reshape(a,size(a,1)*size(a,2),1);
end
cd ..
end
w=uint8(v); % Convert to unsigned 8 bit numbers to save memory.
end
loaded=1; % Set 'loaded' to aviod loading the database again.
save w.mat w;
clear
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Desktop についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!