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

📄 viewdir.mht

📁 it is a very essential matlab code.
💻 MHT
字号:
From: <Saved by Windows Internet Explorer 7>
Subject: 
Date: Tue, 12 May 2009 09:59:22 -0700
MIME-Version: 1.0
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
Content-Location: http://www.mece.ualberta.ca/Courses/mec390/390code/viewdir.m
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY><PRE>% Run this script after creating a 3D plot and it will 
% pop up a couple of sliders to allow changing the viewpoint.
%
% See the MATLAB function 'uicontrol'
%
% This routine is supplied without warrantee or support!

fig = gcf;


sli_azm = uicontrol(fig, 'Style', 'slider', ...
	'Position', [40 10 120 20], ...
	'Min', -180, 'Max', 180, 'Value', 30, ...
	'Callback', [ ...
	'set(azm_cur,''String'',',...
		'num2str(get(sli_azm,''Val''))),',...
	'set(gca,''View'',',...
	'[get(sli_azm,''Val''),get(sli_elv,''Val'')])']);

sli_elv = uicontrol(fig, 'Style', 'slider', ...
	'Position', [230 10 120 20], ...
	'Min', -90, 'Max', 90, 'Value', 30, ...
	'Callback', [ ...
	'set(elv_cur,''String'',',...
		'num2str(get(sli_elv,''Val''))),',...
	'set(gca,''View'',',...
	'[get(sli_azm,''Val''),get(sli_elv,''Val'')])']);

azm_min = uicontrol(fig,...
	'Style', 'text', ...
	'Pos', [10 10 30 20], ...
        'BackGroundColor',[0 1 0],...
	'String', num2str(get(sli_azm, 'Min')));

elv_min = uicontrol(fig,...
	'Style', 'text', ...
	'Pos', [200 10 30 20], ...
        'BackGroundColor',[0 1 1],...
	'String', num2str(get(sli_elv, 'Min')));

azm_max = uicontrol(fig,...
	'Style', 'text', ...
	'Pos', [160 10 30 20], ...
        'BackGroundColor',[0 1 0],...
	'String', num2str(get(sli_azm, 'Max')));

elv_max = uicontrol(fig,...
	'Style', 'text', ...
	'Pos', [350 10 30 20], ...
        'BackGroundColor',[0 1 1],...
	'String', num2str(get(sli_elv, 'Max')));

azm_label = uicontrol(fig, ...
	'Style', 'text', ...
	'Pos', [40 40 65 20], ...
        'BackGroundColor',[0 1 0],...
	'String', 'Azimuth');

elv_label = uicontrol(fig, ...
	'Style', 'text', ...
	'Pos', [230 40 65 20], ...
        'BackGroundColor',[0 1 1],...
	'String', 'Elevation');

azm_cur = uicontrol(fig, ...
	'Style', 'text', ...
	'Pos', [110 40 50 20], ...
        'BackGroundColor',[0 1 0],...
	'String', num2str(get(sli_azm, 'Value')));

elv_cur = uicontrol(fig, ...
	'Style', 'text', ...
	'Pos', [300 40 50 20], ...
        'BackGroundColor',[0 1 1],...
	'String', num2str(get(sli_elv, 'Value')));
</PRE></BODY></HTML>

⌨️ 快捷键说明

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