⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subimage.m

📁 模式识别 MATLAB 的工具箱,比较实用,包括SVM,ICA,PCA,NN等等模式识别算法.
💻 M
字号:
%SUBIMAGE Display dataset image in subplot with predefined colormap%%	subimage(A,map)function subimage(a,map)nx = [];clf;cla;[m,k] = size(a);y = a.c;x = k/y;if x ~= round(x)	if (m/y) == round(m/y)		hh = subimage(a',map);		if nargout > 0, h = hh; end		return	else		error('No image or wrong image height stored')	endendif isempty(nx)	for nx=1:m		ny = ceil(m/nx);		if (ny*y) <= (nx*x), break; end	endelse	ny = ceil(m/nx);endhh = [];for jy = 1:ny	for jx =1:nx		j = (jy-1)*nx + jx;		if j>m, break; end		aa=+subsref(a,struct('type',{'()'},'subs',{{[j] ':'}})); % walk around Matlab bug		aim = reshape(aa,y,x);		hh=[hh subimage([1+(jx-1)*x jx*x],[1+(jy-1)*y jy*y],aim,map)];		hold on	endend	axis([1 nx*x 1 ny*y]);V=get(gcf,'position');V4 = [ny*y*V(3)/(nx*x)];V(2) = V(2) + V(4) - V4;V(4) = V4;%colormap('gray');set(gcf,'position',V);set(gca,'position',[0 0 1 1]);axis off;if nargout > 0, h = hh; endhold off;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -