收藏 分享(赏)

matlab实验主要指令.doc

上传人:hyngb9260 文档编号:6541866 上传时间:2019-04-16 格式:DOC 页数:6 大小:44.50KB
下载 相关 举报
matlab实验主要指令.doc_第1页
第1页 / 共6页
matlab实验主要指令.doc_第2页
第2页 / 共6页
matlab实验主要指令.doc_第3页
第3页 / 共6页
matlab实验主要指令.doc_第4页
第4页 / 共6页
matlab实验主要指令.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

1、1.有关命令行环境的一些操作:(1) clc擦去一页命令窗口,光标回屏幕左上角 (2) clear从工作空间清除所有变量(3) clf 清除图形窗口内容 (4) who列出当前工作空间中的变量 (5) whos列出当前工作空间中的变量及信息 或用工具栏上的 Workspace 浏览器 (6) delete 从磁盘删除指定文件 (7) whech 查找指定文件的路径 ( 9 ) clear all从工作空间清除所有变量和函数 (10) help 查询所列命令的帮助信息 (11) savename保存工作空间变量到文件name.mat (12) savenamexy保存工作空间变量 x y 到文件

2、name.mat (13)loadname下载name文件中的所有变量到工作空间 (14)loadnamexy 下载name文件中的变量 x y 到工作空间 (15)diary name1.m保存工作空间一段文本到文件 name1.m diary off (16)type name.m在工作空间查看 name.m 文件内容 (17)what列出当前目录下的 m 文件和 mat 文件Ctrl+p调用上一次的命令Ctrl+n调用下一行的命令 Ctrl+b 退后一格Ctrl+f前移一格Ctrl + Ctrl+r向右移一个单词Ctrl + Ctrl+l向左移一个单词HomeCtrl+a光标移到行首En

3、dCtrl+e光标移到行尾EscCtrl+u清除一行DelCtrl+d清除光标后字符BackspaceCtrl+h清除光标前字符 Ctrl+k清除光标至行尾字Ctrl+c中断程序运行一常用的窗口命令help 启动联机帮助文件显示what 列出当前目录下的有关文件type 列出 M 文件lookfor 对 help 信息中的关键词查找which 找出函数与文件所在的目录名demo 运行 MATLAB 的演示程序path 设置或查询 MATLAB 的路径Matlab 的 fspecial 函数用法fspecial 函数用于建立预定义的滤波算子,其语法格式为:h = fspecial(type)h

4、= fspecial(type,para)其中 type 指定算子的类型,para 指定相应的参数;type 的类型有:1、averageaveraging filter为均值滤波,参数为 hsize 代表模板尺寸,默认值为【3,3】 。H = FSPECIAL(average,HSIZE) returns an averaging filter H of sizeHSIZE. HSIZE can be a vector specifying the number of rows and columns inH or a scalar, in which case H is a square

5、matrix.The default HSIZE is 3 3.2、diskcircular averaging filter为圆形区域均值滤波,参数为 radius 代表区域半径,默认值为5.H = FSPECIAL(disk,RADIUS) returns a circular averaging filter(pillbox) within the square matrix of side 2*RADIUS+1.The default RADIUS is 5.3、gaussianGaussian lowpass filter为高斯低通滤波,有两个参数,hsize 表示模板尺寸,默认值为

6、【3 3】 ,sigma 为滤波器的标准值,单位为像素,默认值为0.5.H = FSPECIAL(gaussian,HSIZE,SIGMA) returns a rotationallysymmetric Gaussian lowpass filterof size HSIZE with standarddeviation SIGMA (positive). HSIZE can be a vector specifying thenumber of rows and columns in H or a scalar, in which case H is asquare matrix.The

7、default HSIZE is 3 3, the default SIGMA is 0.5.4、laplacian filter approximating the 2-D Laplacian operator为拉普拉斯算子,参数 alpha 用于控制算子形状,取值范围为【0,1】 ,默认值为0.2.H = FSPECIAL(laplacian,ALPHA) returns a 3-by-3 filterapproximating the shape of the two-dimensional Laplacianoperator. The parameter ALPHA controls

8、the shape of theLaplacian and must be in the range 0.0 to 1.0.The default ALPHA is 0.2.5、logLaplacian of Gaussian filter为拉普拉斯高斯算子,有两个参数,hsize 表示模板尺寸,默认值为【3 3】 ,sigma 为滤波器的标准差,单位为像素,默认值为0.5.H = FSPECIAL(log,HSIZE,SIGMA) returns a rotationally symmetricLaplacian of Gaussian filter of size HSIZE with s

9、tandard deviationSIGMA (positive). HSIZE can be a vector specifying the number of rowsand columns in H or a scalar, in which case H is a square matrix.The default HSIZE is 5 5, the default SIGMA is 0.5.6、motionmotion filter为运动模糊算子,有两个参数,表示摄像物体逆时针方向以 theta 角度运动了 len 个像素,len 的默认值为9,theta 的默认值为0;H = FS

10、PECIAL(motion,LEN,THETA) returns a filter to approximate, onceconvolved with an image, the linear motion of a camera by LEN pixels,with an angle of THETA degrees in a counter-clockwise direction. Thefilter becomes a vector for horizontal and vertical motions.Thedefault LEN is 9, the default THETA is

11、 0, which corresponds to ahorizontal motion of 9 pixels.7、prewittPrewitt horizontal edge-emphasizing filter用于边缘增强,大小为【3 3】 ,无参数H = FSPECIAL(prewitt) returns 3-by-3 filter that emphasizeshorizontal edges by approximating a vertical gradient. If you need toemphasize vertical edges, transpose the filte

12、r H: H.1 1 1;0 0 0;-1 -1 -1.8、sobelSobel horizontal edge-emphasizing filter用于边缘提取,无参数H = FSPECIAL(sobel) returns 3-by-3 filter that emphasizeshorizontal edges utilizing the smoothing effect by approximating avertical gradient. If you need to emphasize vertical edges, transposethe filter H: H.1 2 1;0

13、 0 0;-1 -2 -1.9、unsharpunsharp contrast enhancement filter为对比度增强滤波器。参数 alpha 用于控制滤波器的形状,范围为【0,1】 ,默认值为0.2.H = FSPECIAL(unsharp,ALPHA) returns a 3-by-3 unsharp contrastenhancement filter. FSPECIAL creates the unsharp filter from thenegative of the Laplacian filter with parameter ALPHA. ALPHA controlsthe shape of the Laplacian and must be in the range 0.0 to 1.0.The default ALPHA is 0.2.2.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 中等教育 > 中学实验

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报