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

📄 birdsgui.m

📁 非常好的数字处理教程
💻 M
字号:
function varargout = birdsgui(varargin)	Figure_Name='Additive Synthesis Forest';%	[x, cmap] = imread('forest_backdrop.gif');%	[button, bcmap] = imread('bird.jpg');	load 'forest.mat';		figure('name',Figure_Name,'number','off',...			'Position',[100 100 size(x,2)*1.1 size(x,1)*1.1],'MenuBar','none');	h_axis=axes('pos',[0 0 1 1]);	image(x);	axis image;	colormap(cmap);	hold on;	top = 70;	delta = 30;	offset = 15;	h_offset = -20;	text_left = 64;	n = 1;	birds = {'Yellow_Warbler', 'Western_Meadowlark', 'Orchard_Oriole',...	'Chipping_Sparrow', 'Scissor_Tailed_Flycatcher',...	'Black_Throated_Gray_Warbler', 'Cassins_Kingbird',...	'Black_Necked_Stilt', 'Chestnut_Sided_Warbler',...	'Great_Horned_Owl', 'Grasshopper_Sparrow', 'Swamp_Sparrow',...	'Golden_Crowned_Sparrow', 'Indigo_Bunting', 'Robin',...	'Nashville_Warbler', 'Rufous_Sided_Towhee', 'Random_Bird'};	switch computer		case {'GLNX86','MAC'}			birdfontsize = 12;			titlesize = 24;			authorsize = 14;		case 'PCWIN'			birdfontsize = 10;			titlesize = 18;			authorsize = 12;	end	y = -35;	text(52.5,y+60,'Additive Synthesis Forest',...	'fontsize',titlesize,...	'fontweight','bold',...	'color',[0.5 0.9 0.8]);	text(66.5,y+80,'by Bob L. Sturm and Dr. Jerry Gibson',...	'fontsize',authorsize,...	'fontweight','bold',...	'color',[0.5 0.9 0.8]);	for i=1:length(birds),		if (mod(i,10) == 0)			h_offset = h_offset + 200;			n = 1;		end		buttoncommand = ['hbutton' num2str(i) ' = image(button,''xdata'',[35+h_offset:57+h_offset],' ...			'''ydata'',[top+' num2str(n) '*delta,top+' num2str(n) '*delta+20],'...            '''button'',''birdcall(''''' birds{i} ''''')'');'];		%textcommand = ['text(text_left+h_offset,top+' num2str(n) '*delta+offset,''' strrep(birds{i},'_',' ') ''',''fontname'',''times'',''fontsize'',12,''fontweight'',''bold'',''color'',[1 0.9 1]);'];		textcommand = ['text(text_left+h_offset,top+' num2str(n) '*delta+offset,''' strrep(birds{i},'_',' ') ''',''fontsize'',' num2str(birdfontsize) ',''fontweight'',''bold'',''color'',[1 0.9 1]);'];		eval(buttoncommand);		eval(textcommand);		n = n+1;	end	set(h_axis,'visible','off');

⌨️ 快捷键说明

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