from
autoassociative memory
by John Wetters
Develop a Matlab program to demonstrate a neural network autoassociative memory.
|
| plot_vector7_5(vector)
|
%plot a 2 dimensional matrix using image command
%Plot a 35 element vector as a 7x5 grid.
%John Wetters
%4/9/2009
function plot_vector7_5(vector)
%converte 35x1 vector into 7x5 array out
n=1;
for i=1:7
out(i,:)=vector(n:n+4)';
n=n+5;
end
%plot out vector with imagesc function
figure
min_value=min(min(out));%find min value of out arrary
max_value=max(max(out));%find max value of out arrary
clims=[min_value max_value];%set min and max colorbar limits
imagesc(out,clims)
colormap('jet')
colorbar
H = gca;
set(H,'YDir','reverse')
|
|
Contact us at files@mathworks.com