資源簡介
MATLAB實現數字識別,有程序,有注釋,還有仿真結果

代碼片段和文件信息
clear;
load?data1?array_one???%?數據導入
load?data2?array_two
load?data3?three
load?data4?four
load?data5?five
T=[array_one;array_two;three;four;five]‘;%?訓練樣本(目標向量)
net=newhop(T);%?創建網絡
noisy_array_one=array_one;?%數字1-5的帶噪聲數字點陣(隨機法)
noisy_array_two=array_two;
noisy_array_three=three;
noisy_array_four=four;
noisy_array_five=five;
?for?i=1:100??
?????a=rand;
?????if?a<0.1
????????noisy_array_one(i)=-array_one(i);
????????noisy_array_two(i)=-array_two(i);
????????noisy_array_three(i)=-three(i);
????????noisy_array_four(i)=-four(i);
????????noisy_array_five(i)=-five(i);
????end
?end
noisy_one={(noisy_array_one)‘};%?數字識別
identify_one=sim(net{1010}{}noisy_one);
identify_one{10}‘;
noisy_two={(noisy_array_two)‘};
identify_two=sim(net{1010}{}noisy_two);
identify_two{10}‘;
noisy_three={(noisy_array_three)‘};
identify_three=sim(net{1010}{}noisy_three);
identify_three{10}‘;
noisy_four={(noisy_array_four)‘};
identify_four=sim(net{1010}{}noisy_four);
identify_four{10}‘;
noisy_five={(noisy_array_five)‘};
identify_five=sim(net{1010}{}noisy_five);
identify_five{10}‘;
Array_one=imresize(array_one20);%?結果顯示
subplot(351)
imshow(Array_one)
title(‘標準(數字1)‘)?
Array_two=imresize(array_two20);
subplot(352)
imshow(Array_two)
title(‘標準(數字2)‘)?
Array_three=imresize(three20);
subplot(353)
imshow(Array_three)
title(‘標準(數字3)‘)
Array_four=imresize(four20);
subplot(354)
imshow(Array_four)
title(‘標準(數字4)‘)
Array_five=imresize(five20);
subplot(355)
imshow(Array_five)
title(‘標準(數字5)‘)
subplot(356)
Noisy_array_one=imresize(noisy_array_one20);
imshow(Noisy_array_one)
title(‘噪聲(數字1)‘)?
subplot(357)
Noisy_array_two=imresize(noisy_array_two20);
imshow(Noisy_array_two)
title(‘噪聲(數字2)‘)
subplot(358)
Noisy_array_three=imresize(noisy_array_three20);
imshow(Noisy_array_three)
title(‘噪聲(數字3)‘)
subplot(359)
Noisy_array_four=imresize(noisy_array_four20);
imshow(Noisy_array_four)
title(‘噪聲(數字4)‘)
subplot(3510)
Noisy_array_five=imresize(noisy_array_five20);
imshow(Noisy_array_five)
title(‘噪聲(數字5)‘)
subplot(3511)
imshow(imresize(identify_one{10}‘20))
title(‘識別(數字1)‘)
subplot(3512)
imshow(imresize(identify_two{10}‘20))
title(‘識別(數字2)‘)
subplot(3513)
imshow(imresize(identify_three{10}‘20))
title(‘識別(數字3)‘)
subplot(3514)
imshow(imresize(identify_four{10}‘20))
title(‘識別(數字4)‘)
subplot(3515)
imshow(imresize(identify_five{10}‘20))
title(‘識別(數字5)‘)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????3409674??2018-01-05?18:38??大作業\5個數字.fig
?????文件????????195??2009-08-30?17:37??大作業\data1.mat
?????文件????????205??2009-08-30?17:39??大作業\data2.mat
?????文件????????192??2009-08-30?17:51??大作業\data3.mat
?????文件????????195??2009-08-30?17:51??大作業\data4.mat
?????文件????????195??2009-08-30?17:51??大作業\data5.mat
?????文件???????2629??2018-01-05?18:40??大作業\shuzishibie.m
?????目錄??????????0??2018-01-05?20:58??大作業
-----------?---------??----------?-----??----
??????????????3413285????????????????????8
- 上一篇:PM模型代碼Matlab
- 下一篇:Matlab實現softmax分類
評論
共有 條評論