A MATLAB Toolbox and its Web based Variant for Fuzzy Cluster Analysis
MATLAB简介
logspace 对数等分的行矢量
Logspace(x1,x2,n)生成从10x1到10x2包含n 个数据的矢量 >> logspace(1,3,3) >> magic(3) ans = ans = 10 100 1000 8 1 6 >> cell(3) 3 5 7 >> eye(3) ans = 4 9 2 ans = [] [] [] 1 0 0 Magic(n)为元素1到n^2 [] [] [] 0 1 0 之间,行、列、对角线 [] [] [] 0 0 1 的和都相等的n维矩阵
例1:
0 5 cos 47 例2:计算表达式的值 并将结果赋给变量x 1 7 2i
4、表达式从左至右、指数最先,乘除加减、括号提前。
>>6+4*3^2 ans = >> x=(5+cos(47*pi/180))/(1+sqrt(7)-2i) 42
例9:演示内带程序 >>ballode %自由下落小球与地面非弹性碰撞的运动轨迹 >>demo %演示Matlab的基本功能
2、数据格式:
① 10的幂为e加上正负数字: 1.062e-20 6.022e23 ② 数字后直接加 i 或 j表示虚数 :-3.14i 5+3i
3、算符
算术运算算符: + - * / ^ ( ) sqrt( ) 关系运算算符:<、>、 <=、 ==、 >=、 ~= 逻辑运算算符:与 &、或│、非 ~
例3:输入10个学生的成绩并对成绩按升序排序。 在指令窗口输入命令: g=input('请输入学生成绩:') sort(g) 请输入学生成绩: [65 78 96 98 91 84 79 83 74 81]
matlab常用函数操作及常用指令
一matlab常用函数1、特殊变量与常数ans 计算结果的变量名computer 确定运行的计算机eps 浮点相对精度Inf 无穷大I 虚数单位inputname 输入参数名NaN 非数nargin 输入参数个数nargout 输出参数的数目pi 圆周率nargoutchk 有效的输出参数数目realmax 最大正浮点数realmin 最小正浮点数varargin 实际输入的参量varargout 实际返回的参量操作符与特殊字符+ 加-减* 矩阵乘法 .* 数组乘(对应元素相乘)^ 矩阵幂 .^ 数组幂(各个元素求幂)\ 左除或反斜杠/ 右除或斜面杠 ./ 数组除(对应元素除)kron Kronecker张量积: 冒号() 圆括[] 方括 . 小数点 .. 父目录 ... 继续, 逗号(分割多条命令); 分号(禁止结果显示)% 注释! 感叹号' 转置或引用= 赋值== 相等<> 不等于& 逻辑与| 逻辑或~ 逻辑非xor 逻辑异或2、基本数学函数abs 绝对值和复数模长acos,acodh 反余弦,反双曲余弦acot,acoth 反余切,反双曲余切acsc,acsch 反余割,反双曲余割angle 相角asec,asech 反正割,反双曲正割secant 正切asin,asinh 反正弦,反双曲正弦atan,atanh 反正切,双曲正切tangent 正切atan2 四象限反正切ceil 向着无穷大舍入complex 建立一个复数conj 复数配对cos,cosh 余弦,双曲余弦csc,csch 余切,双曲余切cot,coth 余切,双曲余切exp 指数fix 朝0方向取整floor 朝负无穷取整*** 最大公因数imag 复数值的虚部lcm 最小公倍数log 自然对数log2 以2为底的对数log10 常用对数mod 有符号的求余nchoosek 二项式系数和全部组合数real 复数的实部rem 相除后求余round 取整为最近的整数sec,sech 正割,双曲正割sign 符号数sin,sinh 正弦,双曲正弦sqrt 平方根tan,tanh 正切,双曲正切3、基本矩阵和矩阵操作blkding 从输入参量建立块对角矩阵eye 单位矩阵linespace 产生线性间隔的向量logspace 产生对数间隔的向量numel 元素个数ones 产生全为1的数组rand 均匀颁随机数和数组randn 正态分布随机数和数组zeros 建立一个全0矩阵colon) 等间隔向量cat 连接数组diag 对角矩阵和矩阵对角线fliplr 从左自右翻转矩阵flipud 从上到下翻转矩阵repmat 复制一个数组reshape 改造矩阵roy90 矩阵翻转90度tril 矩阵的下三角triu 矩阵的上三角dot 向量点集cross 向量叉集ismember 检测一个集合的元素intersect 向量的交集setxor 向量异或集setdiff 向是的差集union 向量的并集数值分析和傅立叶变换cumprod 累积cumsum 累加cumtrapz 累计梯形法计算数值微分factor 质因子inpolygon 删除多边形区域内的点max 最大值mean 数组的均值mediam 中值min 最小值perms 所有可能的转换polyarea 多边形区域primes 生成质数列表prod 数组元素的乘积rectint 矩形交集区域sort 按升序排列矩阵元素sortrows按升序排列行std 标准偏差sum 求和trapz 梯形数值积分var 方差del2 离散拉普拉斯diff 差值和微分估计gradient 数值梯度cov 协方差矩阵corrcoef 相关系数conv2二维卷积conv 卷积和多项式乘法filter IIR或FIR滤波器deconv 反卷积和多项式除法filter2 二维数字滤波器cplxpair 将复数值分类为共轭对fft 一维的快速傅立叶变换fft2二维快速傅立叶变换fftshift 将FFT的DC分量移到频谱中心ifft 一维快速反傅立叶变换ifft2 二维傅立叶反变换ifftn 多维快速傅立叶变换ifftshift 反FFT偏移nextpow2 最靠近的2的幂次unwrap 校正相位角多项式与插值conv 卷积和多项式乘法roots 多项式的根poly 具有设定根的多项式polyder 多项式微分polyeig 多项式的特征根polyfit 多项式拟合polyint 解析多项式积分polyval 多项式求值polyvalm 矩阵变量多项式求值residue 部分分式展开interp1 一维插值interp2 二维插值interp3 三维插值interpft 使用FFT的一维插值interpn 多维插值meshgrid 为3维点生成x和y的网格ndgrid 生成多维函数和插值的数组pchip 分段3次Hermite插值多项式ppval 分段多项式的值spline 3次样条数据插值绘图函数bar 竖直条图barh 水平条图hist 直方图histc 直方图计数hold 保持当前图形loglog x,y对数坐标图pie 饼状图plot 绘二维图polar 极坐标图semilogy y轴对数坐标图semilogx x轴对数坐标subplot 绘制子图bar3 数值3D竖条图bar3h 水平3D条形图comet3 3D慧星图cylinder 圆柱体fill3 填充的3D多边形plot3 3维空间绘图quiver3 3D震动(速度)图slice 体积薄片图sphere 球stem3 绘制离散表面数据wate***ll 绘制瀑布trisurf 三角表面clabel 增加轮廓标签到等高线图中datetick 数据格式标记grid 加网格线gtext 用鼠标将文本放在2D图中legend 图注plotyy 左右边都绘Y轴title 标题xlabel X轴标签ylabel Y轴标签zlabel Z轴标签contour 等高线图contourc 等高线计算contourf 填充的等高线图hidden 网格线消影meshc 连接网格/等高线mesh 具有参考轴的3D网格peaks 具有两个变量的采样函数surf 3D阴影表面图su***ce 建立表面低层对象surfc 海浪和等高线的结合surfl 具有光照的3D阴影表面trimesh 三角网格图二Matlab常用指令1、通用信息查询(General information)demo 演示程序help 在线帮助指令helpbrowser 超文本文档帮助信息helpdesk 超文本文档帮助信息helpwin 打开在线帮助窗info MATLAB 和MathWorks 公司的信息subscribe MATLAB 用户注册ver MATLAB 和TOOLBOX 的版本信息version MATLAB 版本whatsnew 显示版本新特征2、工作空间管理(Managing the workspace)clear 从内存中清除变量和函数exit 关闭MATLAB load 从磁盘中调入数据变量pack 合并工作内存中的碎块quit 退出MATLAB save 把内存变量存入磁盘who 列出工作内存中的变量名whos 列出工作内存中的变量细节workspace 工作内存浏览器3 、管理指令和函数(Managing commands and functions)edit 矩阵编辑器edit 打开M 文件inmem 查看内存中的P 码文件mex 创建MEX 文件open 打开文件pcode 生成P 码文件type 显示文件内容what 列出当前目录上的M、MAT、MEX 文件which 确定指定函数和文件的位置4 、搜索路径的管理(Managing the seach patli)addpath 添加搜索路径rmpath 从搜索路径中删除目录path 控制MATLAB 的搜索路径pathtool 修改搜索路径5、指令窗控制(Controlling the command window)beep 产生beep 声echo 显示命令文件指令的切换开关diary 储存MATLAB 指令窗操作内容format 设置数据输出格式more 命令窗口分页输出的控制开关6、操作系统指令(Operating system commands)cd 改变当前工作目录computer 计算机类型copyfile 文件拷贝delete 删除文件dir 列出的文件dos 执行dos 指令并返还结果getenv 给出环境值ispc MATLAB 为PC(Windows)版本则为真isunix MATLAB 为Unix 版本则为真mkdir 创建目录pwd 改变当前工作目录unix 执行unix 指令并返还结果vms 执行vms dcl 指令并返还结果web 打开web 浏览器! 执行外部应用程序三Matlab运算符和特殊算符1、算术运算符(Arithmetic operators)+ 加- 减* 矩阵乘 .* 数组乘^ 矩阵乘方 .^ 数组乘方\ 反斜杠或左除/ 斜杠或右除 ./或.\ 数组除张量积[注]本表第三栏括号中的字符供在线救助时help 指令引述用2、关系运算符(Relational operators)= = 等号~= 不等号< 小于> 大于<= 小于或等于>= 大于或等于3、逻辑操作(Logical operators)& 逻辑与| 逻辑或~ 逻辑非xor 异或any 有非零元则为真all 所有元素均非零则为真4、特殊算符(Special characters):冒号( ) 圆括号[ ] 方括号{ } 花括号@ 创建函数句柄 . 小数点 . 构架域的关节点 .. 父目录? 续行号, 逗号; 分号% 注释号! 调用操作系统命令= 赋值符号ˊ引号ˊ复数转置号 .ˊ转置号[,] 水平串接[;] 垂直串接( ),{ },. 下标赋值( ),{ },. 下标标识subsindex 下标标识四Matlab编程语言结构控制语句(Control flow)break 终止最内循环case 同switch 一起使用catch 同try 一起使用continue 将控制转交给外层的for 或while 循环else 同if 一起使用elseif 同if 一起使用end 结束for,while,if 语句for 按规定次数重复执行语句if 条件执行语句otherwise 可同switch一起使用return 返回switch 多个条件分支try try-cathch 结构while 不确定次数重复执行语句2、计算运行(Evaluation and execution)assignin 跨空间赋值builtin 执行内建的函数eval 字符串宏指令evalc 执行MATLAB 字符串evalin 跨空间计算串表达式的值feval 函数宏指令run 执行脚本文件3、脚本文件、函数及变量(Scripts,function,and variables)exist 检查变量或函数是否被定义function 函数文件头global 定义全局变量isglobal 若是全局变量则为真iskeyword 若是关键字则为真mfilename 正在执行的M 文件的名字persistent 定义永久变量script MATLAB 命令文件4、宗量处理(Augument handling)inputname 实际调用变量名nargchk 输入变量个数检查nargin 函数输入宗量的个数nargout 函数输出宗量的个数nargoutchk 输出变量个数检查varagin 输入宗量varagout 输出宗量5、信息显示(Message display)disp 显示矩阵和文字内容display 显示矩阵和文字内容的重载函数error 显示错误信息fprintf 把格式化数据写到文件或屏幕lasterr 最后一个错误信息lastwarn 最后一个警告信息sprintf 按格式把数字转换为串warning 显示警告信息6 、交互式输入(Interactive input) input 提示键盘输入keyboard 激活键盘做为命令文件pause 暂停uicontrol 创建用户界面控制uimenu 创建用户界面菜单五Matlab基本矩阵函数和操作1、基本矩阵(Elementary matrices)eye 单位阵linspace 线性等分向量logspace 对数等分向量meshgrid 用于三维曲面的分格线坐标ones 全1 矩阵rand 均匀分布随机阵randn 正态分布随机阵repmat 铺放模块数组zeros 全零矩阵: 矩阵的援引和重排2、矩阵基本信息(Basic array information)disp 显示矩阵和文字内容isempty 若是空矩阵则为真isequal 若对应元素相等则为1 islogical 尤其是逻辑数则为真isnumeric 若是数值则为真length 确定向量的长度logical 将数值转化为逻辑值ndims 数组A 的维数size 确定矩阵的维数3、矩阵操作(Matrix manipulateion)blkdiag 块对角阵串接diag 创建对角阵,抽取对角向量end 数组的长度,即最大下标find 找出非零元素1 的下标fliplr 矩阵的左右翻转flipud 矩阵的上下翻转flipdim 交换对称位置上的元素ind2sub 据单下标换算出全下标reshape 矩阵变维rot90 矩阵逆时针90°旋转sub2idn 据全下标换算出单下标tril 抽取下三角阵triu 抽取上三角阵4、特殊变量和常数(Special variables and constants)ans 最新表达式的运算结果eps 浮点相对误差i,j 虚数单位inf 或Inf 无穷大isfinite 若是有限数则为真isinf 若是无穷大则为真isnan 若为非数则为真NaN 或nan 非数pi 3.1415926535897?. realmax 最大浮点数realmin 最小正浮点数why 一般问题的简明答案5、特殊矩阵(Specialized matrices)compan 伴随矩阵gallery 一些小测试矩阵hadamard Hadamard 矩阵hankel Hankel 矩阵hilb Hilbert 矩阵invhilb 逆Hilbert 矩阵magic 魔方阵pascal Pascal 矩阵rosser 典型对称特征值实验问题toeplitz Toeplitz 矩阵vander Vandermonde 矩阵wilkinson Wilkinson's 对称特征值实验矩阵六Matlab基本数学函数1、三角函数(Trigonometric)acos 反余弦acosh 反双曲余弦acot 反余切acoth 反双曲余切acsc 反余割acsch 反双曲余割asec 反正割asech 反双曲正割asin 反正弦asinh 反双曲正弦atan 反正切atanh 反双曲正切atan2 四象限反正切cos 余弦cosh 双曲余弦cot 余切coth 双曲余切csc 余割csch 双曲余割sec 正割sech 双曲正割sin 正弦sinh 双曲正弦tan 正切tanh 双曲正切2、指数函数(Exponential)exp 指数log 自然对数log10 常用对数log2 以2 为底的对数nestpow2 最近邻的2 的幂pow2 2 的幂sqrt 平方根3、复数函数(Complex)abs 绝对值angle 相角complex 将实部和虚部构成复数conj 复数共轭cplxpair 复数阵成共轭对形式排列imag 复数虚部isreal 若是实数矩阵则为真real 复数实部unwrap 相位角360°线调整4、圆整和求余函数(Rounding and remainder)ceil 朝正无穷大方向取整fix 朝零方向取整floor 朝负无穷大方向取整mod 模数求余rem 求余数round 四舍五入取整sign 符号函数6 特殊函数(Specialized math functions) cart2pol 直角坐标变为柱(或极)坐标cart2sph 直角坐标变为球坐标cross 向量叉积dot 向量内积isprime 若是质数则为真pol2cart 柱(或极)坐标变为直角坐标sph2cart 球坐标变为直角坐标七Matlab矩阵函数和数值线性代数1、矩阵分析(Matrix analysis)det 行列式的值norm 矩阵或向量范数normest 估计2 范数null 零空间orth 值空间rank 秩rref 转换为行阶梯形trace 迹subspace 子空间的角度2、线性方程(Linear equations)chol Cholesky 分解cholinc 不完全Cholesky 分解cond 矩阵条件数condest 估计1-范数条件数inv 矩阵的逆lu LU 分解luinc 不完全LU 分解lscov 已知协方差的最小二乘积nnls 非负二乘解pinv 伪逆qr QR 分解rcond LINPACK 逆条件数\、/ 解线性方程3、特性值与奇异值(Eigenvalues and singular values)condeig 矩阵各特征值的条件数eig 矩阵特征值和特征向量eigs 多个特征值gsvd 归一化奇异值分解hess Hessenberg 矩阵poly 特征多项式polyeig 多项式特征值问题qz 广义特征值schur Schur 分解svd 奇异值分解svds 多个奇异值4、矩阵函数(Matrix functions)expm 矩阵指数expm1 矩阵指数的Pade 逼近expm2 用泰勒级数求矩阵指数expm3 通过特征值和特征向量求矩阵指数funm 计算一般矩阵函数logm 矩阵对数sqrtm 矩阵平方根5、因式分解(Factorization utility)cdf2rdf 复数对角型转换到实块对角型balance 改善特征值精度的平衡刻度rsf2csf 实块对角型转换到复数对角型八数据分析和傅里叶变换1、基本运算(Basic operations)cumprod 元素累计积cumsum 元素累计和cumtrapz 累计积分hist 统计频数直方图histc 直方图统计max 最大值mean 平均值median 中值min 最小值prod 元素积sort 由小到大排序sortrows 由小到大按行排序std 标准差sum 元素和trapz 梯形数值积分var 求方差2、有限差分(Finite differentces)del2 五点离散Laplacian diff 差分和近似微分gradient 梯度3、相关(Correlation)corrcoef 相关系数cov 协方差矩阵subspace 子空间之间的角度4、滤波和卷积(Filtering and convoluteion)conv 卷积和多项式相乘conv2 二维卷积convn N 维卷积detrend 去除线性分量deconv 解卷和多项式相除filter 一维数字滤波器fliter2 二维数字滤波器5、傅里叶变换(Fourier transforms)fft 快速离散傅里叶变换fft2 二维离散傅里叶变换fftn N 维离散傅里叶变换fftshift 重排fft 和fft2 的输出ifft 离散傅里叶反变换ifft2 二维离散傅城叶反变换ifftn N 维离散傅里叶反变换ifftshift 反fftshift九音频支持1、音频硬件驱动(Audio hardware drivers)sound 播放向量soundsc 自动标刻并播放waveplay 利用系统音频输出设配播放waverecor 利用系统音频输入设配录音2、音频文件输入输出(Audio file import and export)auread 读取音频文件(.au) auwrite 创建音频文件(.au) wavread 读取音频文件(.wav) wavwrite 创建音频文件(.wav)3、工具(Utilities)lin2mu 将线性信号转换为μ 一律编码的信号mu2lin 将μ 一律编码信号转换为线性信号十插补多项式函数1、数据插补(Data Interpolation)griddata 分格点数据griddata3 三维分格点数据griddatan 多维分格点数据interpft 利用FFT 方法一维插补interp1 一维插补interp1q 快速一维插补interp2 二维插补interp3 三维插补intern N 维插补pchip hermite 插补2 、样条插补(Spline Interpolation)ppval 计算分段多项式spline 三次样条插补3 、多项式(Polynomials)conv 多项式相乘deconv 多项式相除poly 由根创建多项式polyder 多项式微分polyfit 多项式拟合polyint 积分多项式分析polyval 求多项式的值polyvalm 求矩阵多项式的值residue 求部分分式表达roots 求多项式的根十一数值泛函函数和ODE 解算器1、优化和寻根(Optimization and root finding)fminbnd 非线性函数在某区间中极小值fminsearch 单纯形法求多元函数极值点指令fzero 单变量函数的零点2、优化选项处理(Optimization Option handling)optimget 从OPTIONS 构架中取得优化参数optimset 创建或修改OPTIONS 构架3、数值积分(Numerical intergration)dblquad 二重(闭型)数值积分指令quad 低阶法数值积分quadl 高阶法数值积分4、绘图(Plotting)ezcontour 画等位线ezcontourf 画填色等位线ezmesh 绘制网格图ezmeshc 绘制含等高线的网格图ezplot 绘制曲线ezplot3 绘制3 维曲线ezpolar 采用极坐标绘图ezsurf 画曲面图ezsurfc 画带等位线的曲面图fplot 画函数曲线图5、内联函数对象(Inline function object)argnames 给出函数的输入宗量char 创建字符传输组或者将其他类型变量转化为字符串数组formula 函数公式inline 创建内联函数6、差微分函数解算器(Differential equation solvers)ode113 变阶法解方程ode15s 变阶法解刚性方程ode23 低阶法解微分方程ode23s 低阶法解刚性微分方程ode23t 解适度刚性微分方程odet23tb 低阶法解刚性微分方程ode45 高阶法解微分方程十二二维图形函数1、基本平面图形(Elementary X-Y graphs)loglog 双对数刻度曲线plot 直角坐标下线性刻度曲线plotyy 双纵坐标图polar 极坐标曲线图semilogx X 轴半对数刻度曲线semilogy Y 轴半对数刻度曲线2 、轴控制(Axis control)axes 创建轴axis 轴的刻度和表现box 坐标形式在封闭式和开启词式之间切换grid 画坐标网格线hold 图形的保持subplot 创建子图zoom 二维图形的变焦放大3、图形注释(Graph annotation)gtext 用鼠标在图上标注文字legend 图例说明plotedit 图形编辑工具text 在图上标注文字texlabel 将字符串转换为Tex 格式title 图形标题xlabel X 轴名标注ylabel Y 轴名标注4、硬拷贝(Hardcopy and printing)orient 设置走纸方向print 打印图形或把图存入文件printopt 打印机设置十三三维图形函数1、基本三维图形(Elementary 3-D plots) fill3 三维曲面多边形填色mesh 三维网线图plot3 三维直角坐标曲线图surf 三维表面图2 、色彩控制(Color control)alpha 透明色控制brighten 控制色彩的明暗caxis (伪)颜色轴刻度colordef 用色风格colormap 设置色图graymon 设置缺省图形窗口为单色显示屏hidden 消隐shading 图形渲染模式whitebg 设置图形窗口为白底3、光照模式(Lighting)diffuse 漫反射表面系数light 灯光控制lighting 设置照明模式material 使用预定义反射模式specular 漫反射surfnorm 表面图的法线surfl 带光照的三维表面图4 、色图(Color maps)autumn 红、黄浓淡色bone 蓝色调灰度图colorcube 三浓淡多彩交错色cool 青和品红浓淡色图copper 线性变化纯铜色调图flag 红-白-蓝黑交错色图gray 线性灰度hot 黑-红-黄-白交错色图hsv 饱和色彩图jet 变异HSV 色图lines 采用plot 绘线色pink 淡粉红色图prism 光谱色图spring 青、黄浓淡色summer 绿、黄浓淡色vga 16 色white 全白色winter 蓝、绿浓淡色5、轴的控制(Axis control)axes 创建轴axis 轴的刻度和表现box 坐标形式在封闭式和开启式之间切换daspect 轴的DataAspectRatio 属性grid 画坐标网格线hold 图形的保持pbaspect 画坐标框的PlotBoxAspectRatio 属性subplot 创建子图xlim X 轴范围ylim Y 轴范围zlim Z 轴范围zoom 二维图形的变焦放大6、视角控制(Viewpoint control)rotate3d 旋动三维图形view 设定3-D 图形观测点viewmtx 观测点转换矩阵7、图形注释(Graph annotation)colorbar 显示色条gtext 用鼠标在图上标注文字plotedit 图形编辑工具text 在图上标注文字title 图形标题xlabel X 轴名标注ylabel Y 轴名标注zlabel Z 轴名标注8 、硬拷贝(Hardcopy and printing)orient 设置走纸方向print 打印图形或把图存入文件printopt 打印机设置verml 将图形保存为VRML2.0 文件十四特殊图形1、特殊平面图形(Specialized 2-D graphs)area 面域图bar 直方图barh 水平直方图comet 彗星状轨迹图compass 从原点出发的复数向量图errorbar 误差棒棒图ezplot 画二维曲线ezpolar 画极坐标曲线feather 从X 轴出发的复数向量图fill 多边填色图fplot 函数曲线图hist 统计频数直方图pareto Pareto 图pie 饼形统计图plotmatrix 散点图阵列scatter 散点图stairs 阶梯形曲线图stem 火柴杆图2 、等高线及二维半图形(Contour and 2-1/2D graphs)clabel 给等高线加标注contour 等高线图contourf 等高线图contour3 三维等高线ezcontour 画等位线ezcontourf 画填色等位线pcolor 用颜色反映数据的伪色图voronoi Voronoi 图3、特殊三维图形(Specialized 3-D graphs)bar3 三维直方图bar3h 三维水平直方图comet3 三维彗星动态轨迹线图ezgraph3 通用指令ezmesh 画网线图ezmeshc 画等位线的网线图ezplot3 画三维曲线ezsurf 画曲面图ezsurfc 画带等位线的曲面图meshc 带等高线的三维网线图meshz 带零基准面的三维网线图pie3 三维饼图ribbon 以三维形式绘制二维曲线scatter3 三维散点图stem3 三维离散杆图surfc 带等高线的三维表面图trimesh 三角剖分网线图trisurf 三角剖分曲面图waterfall 瀑布水线图4、内剖及向量视图(Volume and vector visualization)coneplot 锥体图contourslice 切片等位线图quiver 矢量场图quiver3 三维方向箭头图slice 切片图5、图像显示及文件处理(Image display and file I/O)brighten 控制色彩的明暗colorbar 色彩条状图colormap 设置色图contrast 提高图像对比度的灰色图gray 线性灰度image 显示图像imagesc 显示亮度图像imfinfo 获取图像文件的特征数据imread 从文件读取图像的数据阵(和伴随色图))imwrite 把强度图像或真彩图像写入文件6、影片和动画(Movies and animation)capture 当前图的屏捕捉frame2im 将影片动画转换为编址图像getframe 获得影片动画图像的帧im2frame 将编址图像转换为影片动画movie 播放影片动画moviein 影片动画内存初始化rotate 旋转指令7、颜色相关函数(Color related function)spinmap 颜色周期性变化操纵8、三维模型函数(Solid modeling)cylinder 圆柱面patch 创建块sphere 球面Surf2patch 将曲面数据转换为块数据十五句柄图形1、图形窗的产生和控制(Figure window creation and control)clf 清除当前图close 关闭图形figure 打开或创建图形窗口gcf 获得当前图的柄openfig 打开图形refresh 刷新图形shg 显示图形窗2、轴的产生和控制(Axis creation and control)axes 在任意位置创建轴axis 轴的控制box 坐标形式在封闭式和开启式之间切换caxis 控制色轴的刻度cla 清除当前轴gca 获得当前轴的柄hold 图形的保持ishold 若图形处保持状态则为真subplot 创建子图3、句柄图形对象(Handle Graphics objects)axex 在任意位置创建轴figure 创建图形窗口image 创建图像light 创建光line 创建线patch 创建块rectangle 创建方surface 创建面text 创建图形中文本uicontextmenu 创建现场菜单对象uicontrol 用户使用界面控制uimenu 用户使用菜单控制4、句柄图形处理(Handle Graphics operations)copyobj 拷贝图形对象及其子对象delete 删除对象及文件drawnow 屏幕刷新findobj 用规定的特性找寻对象gcbf "正执行回调操作"的图形的柄gcbo "正执行回调操作"的控件图柄指令gco 获得当前对象的柄get 获得对象特性getappdat 获得应用程序定义数据isappdata 检验是否应用程序定义数据reset 重设对象特性rmappdata 删除应用程序定义数据set 建立对象特性setappdata 建立应用程序定义数据5 、工具函数(Utilities)closereq 关闭图形窗请求函数ishandle 若是图柄代号侧为真newplot 下一个新图十六图形用户界面工具align 对齐用户控件和轴cbedit 编辑回调函数ginput 从鼠标得到图形点坐标guide 设计GUI menu 创建菜单menuedit 菜单编辑propedit 属性编辑uicontrol 创建用户界面控制uimenu 创建用户界面菜单十七字符串1 、通用字符串函数(General)blanks 空格符号cellstr 通过字符串数组构建字符串的元胞数组char 创建字符传输组或者将其他类型变量转化为字符串数组deblank 删除最后的空格double 把字符串变成ASCII 码值eval 执行串形式的MATLAB 表达式2、字符串查询(String tests)iscellstr 若是字符串组成的元胞数组则为真ischar 若是字符串则为真isletter 串中是字母则为真isspace 串中是空格则为真isstr 若是字符串则为真3、字符串操作(String operations)base2dec X-进制串转换为十进制整数bin2dec 二进制串转换为十进制整数dec2base 十进制整数转换为X 进制串dec2bin 十进制整数转换为二进制串dec2hex 十进制整数转换为16 进制串findstr 在一个串中寻找一个子串hex2dec 16-进制串转换为十进制整数hex2num 16-进制串转换为浮点数int2str 将整数转换为字符串lower 把字符串变成小写mat2str 将数组转换为字符串num2str 把数值转换为字符串strcat 把多个串连接成长串strcmp 比较字符串strcmpi 比较字符串(忽略大小写)strings MATLAB 中的字符串strjust 字符串的对齐方式strmatch 逐行搜索串strnomp 比较字符串的前N 个字符strncmpi 比较字符串的前N 个字符(忽略大小写)strrep 用另一个串代替一个串中的子串strtok 删除串中的指定子串strvcat 创建字符串数组str2mat 将字符串转换为含有空格的数组str2num 将字符串转换为数值upper 把字符串变成大写十八文件输入/输出clc 清除指令窗口disp 显示矩阵和文字内容fprintf 把格式化数据写到文件或屏幕home 光标返回行首input 提示键盘输入load 从磁盘中调入数据变量pause 暂停sprintf 写格式数据到串sscanf 在格式控制下读串十九时间和日期clock 时钟cputme MATLAB 战用CPU 时间date 日期etime 用CLOCK 计算的时间now 当前时钟和日期pause 暂停tic 秒表启动toc 秒表终止和显示二十数据类型1、数据类型(Data types)cell 创建元胞变量char 创建字符传输组或者将其他类型变量转化为字符串数组double 转化为16 位相对精度的浮点数值对象function handle 函数句柄inline 创建内联函数JavaArray 构建Java 数组JavaMethod 调用某个Java 方法JavaObject 调用Java 对象的构造函数single 转变为单精度数值sparse 创建稀疏矩阵struct 创建构架变量uint8(unit16、unit32) 转换为8(16、32)位无符号整型数int8(nit16、nit32) 转换为8(16、32)位符号整型数2、多维数组函数(Multi-dimensional array functions)cat 把若干数组串接成高维数组ndims 数组A 的维数ndgrid 为N-D 函数和插补创建数组ipermute 广义反转置permute 广义非共轭转置shiftdim 维数转换squeeze 使数组降维3、元胞数组函数(Cell array functions)cell 创建元胞变量celldisp 显示元胞数组内容cellfun 元胞数组函数cellplot 图示元胞数组的内容cell2struct 把元胞数组转换为构架数组deal 把输入分配给输出is cell 若是元胞则为真num2 cell 把数值数组转换为元胞数组struct2 cell 把构架数组转换为元胞数组4、构架函数(Structure functions)fieldnames 获取构架的域名getfield 获取域的内容isfield 若为给定构架的域名则为真isstruct 若是构架则为真rmfield 删除构架的域setfield 指定构架域的内容struct 创建构架变量5、函数句柄函数(Function handle functions)@ 创建函数句柄functions 列举函数句柄对应的函数func2str 将函数句柄数组转换为字符串str2func 将字符串转换为函数句柄6、面向对象编程(Object oriented programming functions)dlass 查明变量的类型isa 若是指定的数据类型则为真inferiorto 级别较低isjava 若是java 对象则为真isobject 若是对象则为真methods 显示类的方法名substruct 创建构架总量superiorto 级别较高二一示例demo 演示程序flow 无限大水体中水下射流速度数据intro 幻灯演示指令peaks 产生peaks 图形数据二二符号工具包1、微积分(Calculus)diff 求导数limit 求极限int 计算积分jacobian Jacobian 矩阵symsum 符号序列的求和trylor Trylor 级数2、线性代数(Linear Algebra)det 行列式的值diag 创建对角阵,抽取对角向量eig 矩阵特征值和特征向量expm 矩阵指数inv 矩阵的逆jordan Jordan 分解null 零空间poly 特征多项式rank 秩rref 转换为行阶梯形svd 奇异值分解tril 抽取下三角阵triu 抽取上三角阵3、化简(Simplification)collect 合并同类项expand 对指定项展开factor 进行因式或因子分解horner 转换成嵌套形式numden 提取公因式simple 运用各种指令化简符号表达式simplify 恒等式简化subexpr 运用符号变量置换子表达式subs 通用置换指令4、方程求解(Solution of Equation)compose 求复函数dsolve 求解符号常微分方程finverse 求反函数fminunc 拟牛顿法求多元函数极值点fsolve 解非线性方程组lsqnonlin 解非线性最小二乘问题solve 求解方程组5、变量精度(Variable Precision Arithmetic)digits 设置今后数值计算以n 位相对精度进行vpa 给出数值型符号结果6、积分变换(Integral Transforms)fourier Fourier 变换ifourier Fourier 反变换ilaplace Ilaplace 反变换iztrans Z 反变换laplace Ilaplace 变换ztrans Z 变换7、转换(Conversions)char 把符号对象转化为字符串数组double 把符号常数转化为16 位相对精度的浮点数值对象poly2sym 将多项式转换为符号多项式sym2poly 将符号多项式转换为系数向量8、基本操作(Basic Operation)ccode 符号表达式的C 码表达式findsym 确认表达式中符号"变量" fortran 符号表达式的fortran 表达式latex 符号表达式的LaTex 表示pretty 习惯方式显示sym 定义基本符号对象syms 定义基本符号对象。
MATLAB Virtual Reality Toolbox(matlab虚拟实验平台)
MATLAB Virtual Reality ToolboxInstalling a VRML Plug-In (Windows)When you install the Virtual Reality Toolbox, the Virtual Reality Toolbox viewer is set as the defa ult viewer. If you want to use a Web browser as a VRML viewer, use the following procedure to install t he blaxxun Contact plug-in. You can use this plug-in with either Microsoft Internet Explorer or Netscap e Navigator. The blaxxun Contact plug-in is the only supported VRML plug-in.You must use blaxxun Contact 4.4 with Version 3.0 of the Virtual Reality Toolbox. This version of t he blaxxun Contact VRML plug-in is distributed with the Virtual Reality Toolbox. You can download blaxx un Contact 4.4 from /support/product/VR/.If you have the MATLAB Web Server installed on your machine, make sure that the Web Server is stopp ed before you install the blaxxun Contact plug-in. Also, verify that you are connected to the Internet before starting this installation procedure:1.Start MATLAB.2.In the MATLAB Command Window, type :vrinstall -install viewerMATLAB displays the message :Do you want to use OpenGL or Direct3d acceleration? (o/d)3.Check the graphic card manual to determine the acceleration method to select. If you are not sure, se lect Direct 3d by typing :dThe blaxxun installer starts running and displays the following dialog box.4.Follow the instructions on the remaining screens.5.In the MATLAB Command Window, type :vrinstall -checkIf the viewer installation was successful,MATLAB displays the following message: VRML viewer: installed If the viewer installation was unsuccessful, MATLAB displays the message:VRML viewer: not installed Known Issue with the blaxxun Contact Plug-InThe blaxxun Contact VRML plug-in can fail to update the virtual scene when used with the Virtual Re ality Toolbox 3.0 and Microsoft Internet Explorer 5.5 and above. Netscape users do not experience this problem.If you are using Internet Explorer 5.5 or above, you must manually change a network security settin g before you can use blaxxun Contact 4.4 with the Virtual Reality Toolbox Version 3.0. Upgrading your v ersion of blaxxun Contact does not resolve this problem.Changing the Default Network Security SettingYou must change your default network security setting before using the blaxxun Contact plug-in withInternet Explorer 5.5 and above to ensure that the virtual scene is updated appropriately:1.Open Internet Explorer.2.From the Tools menu, choose Internet Options. The Internet Options dialog box opens.3.Click the Security tab.4.Select the Custom Level button. The Security Settings dialog box opens.5.Scroll down until you see Microsoft VM. The first subheading is Java permissions.6.Select Custom. The Java Custom Settings button appears in the lower left of the Security Settings dia log box.7.Click Java Custom Settings. The Local intranet dialog box opens.8.Click the Edit Permissions tab.9.Scan the main headings and subheadings (marked with a lock icon) until you see Access to all Network Addresses.10.Under Access to all Network Addresses, select Enable.11.Click OK. The Local intranet dialog box closes.12.In the Security Settings dialog box, click OK. You are asked if you want to change the security sett ings for this zone.13.Select Yes.14.In the Internet Options dialog box, select OK.Setting the Default Viewer of Virtual ScenesIf you install a VRML plug-in in your Web browser, it is possible to view virtual scenes with eithe r the Virtual Reality Toolbox viewer or your Web browser. You determine the viewer used to display your scene using the vrsetpref and vrgetpref commands. The following procedure assumes that you are working on a PC platform:1.At the MATLAB command prompt, type :vrinstall -checkto determine whether blaxxun Contact is installed.MATLAB displays: VRML viewer: installedVRML editor: installedThe viewer and editor are installed. If the viewer is not installed, see Installing a VRML Plug-In (Win dows).2.Determine your default viewer by typing :vrgetprefMATLAB displays :ans = DefaultFigurePosition: [5 25 400 320]DefaultPanelMode: 'halfbar'DefaultViewer: 'internal'Editor: [1x60 char]HttpPort: 8123TransportBuffer: 5VrPort: 8124The DefaultViewer property is set to 'internal'. The Virtual Reality Toolbox viewer is the default view er for viewing virtual scenes. Any virtual scenes that you open are displayed in the viewer.3.For example, at the MATLAB command prompt, type :vrbounceThe Bouncing Ball demo is loaded and the virtual scene is displayed in the Virtual Reality Toolbox view er.4.Change the default viewer to your Web browser by typing : vrsetpref('DefaultViewer','web')The default Windows system VRML plug-in is used. The blaxxun Contact VRML plug-in sets itself as the de fault VRML plug-in during its installation.5.At the MATLAB command prompt, type: vrbounceThe Bouncing Ball demo is loaded and the virtual scene is displayed in your Web browser.6.Reset the Virtual Reality Toolbox viewer as your default viewer by typingvrsetpref('DefaultViewer','factory')7.All virtual scenes are displayed by the Virtual Reality Toolbox viewer.In the vrbounce model window, double-click the VR Sink block.A Block Parameters dialog box opens.The target of the View button is determined by the DefaultViewer property. If the DefaultViewer propert y is set to 'internal', clicking the View button opens the virtual world in the Virtual Reality Toolbox viewer. If the DefaultViewer property is set to 'web', clicking the View button opens the virtual worl d in your Web browser.Installing VRML Editor (Windows)When you install the Virtual Reality Toolbox, files are copied to your hard drive for V-Realm Build er, but the installation is not complete.Installing the VRML editor writes a key to the Windows registry, making extra library files in V-Realm Builder available for you to use, and it associates the Edit button in Virtual Reality Toolbox blocks w ith this editor:1.Start MATLAB.2.In the MATLAB Command Window, type: vrinstall -install editoror type :vrinstall('-install','editor')MATAB displays the following messages: Starting editor installation...Done.3.Type :vrinstall -checkIf the editor installation was successful, MATLAB displays the following message:VRML editor: installedSetting the Default Editor of Virtual ScenesYou can edit virtual scenes with a VRML authoring tool, such as V-Realm Builder, or with any text e ditor, as the VRML language is written in text files. You determine the editor that is used to edit you r scene by using the vrsetpref and vrgetpref commands.The following procedure demonstrates how to change your editor from V-Realm Builder to a text edito r. It assumes that you are working on a PC platform:1.At the MATLAB command prompt, type: vrinstall -checkto determine whether V-Realm Builder is installed.MATLAB displays:VRML viewer: installedVRML editor: installedThe viewer and editor are installed. If the editor is not installed, see Installing VRML Editor (Window s).2.Determine your default editor by typing :a = vrgetprefMATLAB displays :a = DefaultFigurePosition: [5 25 400 320]DefaultPanelMode: 'halfbar'DefaultViewer: 'web'Editor: [1x60 char]HttpPort: 8123TransportBuffer: 5VrPort: 8124The variable a is a structure array. You need to index into it to determine the Editor property.3.To determine your default editor, type :a.EditorMATLAB displays :ans ="%matlabroot\toolbox\vr\vrealm\program\vrbuild2.exe" "%file"This is the path to the V-Realm Builder executable file. V-Realm Builder is the current VRML editor. 4.Verify that V-Realm Builder is your default editor. At the MATLAB command prompt, type:vrpendThe Inverted Pendulum demo loads and the pendulum is visible in the viewer.5.In the vrpend model window, double-click the VR Sink block. The Block Parameters dialog box opens.6.Click Edit. The vrpend model opens in the V-Realm Builder authoring tool.7.Change the default editor to the MATLAB editor by typingvrsetpref('Editor','%matlabroot\bin\win32\meditor.exe %file')You can set your editor to any text editor you want to use by specifying the path to the executable of the text editor.8.Within the vrpend demo, open the VR Sink Block Parameters dialog box.9.Click the Edit button.The MATLAB editor opens and is now set as your default VRML editor.10.To reset the V-Realm Builder authoring tool as your default VRML editor, type :vrsetpref('Editor','factory')Clicking the Edit button now launches V-Realm Builder.What Is the Virtual Reality Toolbox?The Virtual Reality Toolbox is a solution for viewing and interacting with dynamic systems in a thr ee-dimensional virtual reality environment. It extends the capabilities of MATLAB and Simulink into the world of virtual reality graphics.●Virtual worlds -- Create virtual worlds or three-dimensional scenes using standard Virtual Reality Modeling Language (VRML) technology.●Dynamic systems -- Create and define dynamic systems with MATLAB and Simulink.●Animation -- View moving three-dimensional scenes driven by signals from the Simulink environment.●Manipulation -- Change the position and properties of objects in a virtual world, or change parameters in your Simulink model while running a simulation.To provide a complete working environment, the Virtual Reality Toolbox includes additional componen ts:●VRML viewer -- Use either the Virtual Reality Toolbox viewer or, for PC platforms, the blaxxunContact plug-in for Web browsers to display your virtual worlds.●VRML editor -- For PC platforms, use V-Realm Builder to create and edit VRML code. For UNIX orLinux platforms, use the MATLAB text editor to write VRML code to create virtual worlds. Associating a Virtual World with SimulinkWith the Virtual Reality Toolbox you can interface a Simulink block diagram with a virtual world. T he example in this section explains how to display a simulated virtual world on a host computer. This i s the recommended way to view associated virtual worlds on the host computer.This section includes the following topics:●Adding a Virtual Reality Toolbox Block -- Connect a Simulink model to a virtual world●Changing the Virtual World Associated with a Simulink Block -- Change the virtual world associatedwith a Simulink model, and change the signals passed between Simulink and the virtual world Adding a Virtual Reality Toolbox BlockSimulating a Simulink model generates signal data for a dynamic system. By connecting the Simulink model to a virtual world, you can use this data to control and animate the virtual world.After you create a virtual world and a Simulink model, you can connect the two with Virtual Reality Toolbox blocks. The example in this procedure simulates a plane taking off and lets you view it in a v irtual world:1.In the MATLAB Command Window, type :vrtut2A Simulink model opens without a Virtual Reality Toolbox block that connects the model to a virtual wor ld.2.From the Simulation menu, select Normal, then click Start.Observe the results of the simulation in the scope windows.3.In the MATLAB Command Window, type :vrlibThe Virtual Reality Toolbox library opens.4.From the Library window, drag and drop the VR Sink block to the Simulink diagram. You can then close the Library: vrlib window.Now you are ready to select a virtual world for the visualization of your simulation. A simple virtual world with a runway and a plane is in the VRML file vrtkoff.wrl.5.In the Simulink model, double-click the block labeled VR Sink.The Block Parameters: VR Sink dialog box opens.6.In the Description text box, enter a brief description of the model. This description appears on the list of available worlds served by the Virtual Reality Toolbox server. For example, type :VR Plane taki ng off7.Click the Browse button. The Select World dialog box opens. Find the directory <matlab root>\toolbox\ vr\vrdemos. Select the file vrtkoff.wrl, and click Open.8.In the Block Parameters: VR Sink dialog box, click Apply.A VRML tree appears on the right side, showing the structure of the associated virtual reality scene.9.Select Show node types. On the left of the Plane Transform node, click the + square.The Plane Transform tree expands. Now you can see what characteristics of the plane can be driven from Simulink. This model computes the position and the pitch of the plane.10.In the Plane Transform tree, select the translation and rotation fieldsThe selected fields are marked with checks. These fields represent the position (translation) and the p itch (rotation) of the plane.11.Click OK. In the Simulink diagram, the VR Sink block is updated with two inputs.The first input is Plane rotation. The rotation is defined by a four-element vector. The first three nu mbers define the axis of rotation. In this example, it should be [1 0 0] for the x-axis. The pitch of t he plane is expressed by the rotation about the x-axis. The last number is the rotation angle around the x-axis, in radians.12.In the Simulink model, connect the line going to the Scope block labeled Display Pitch to the Plane rotation input.The second input is Plane translation. This input describes the plane's position in the virtual world. This position consists of three coordinates, x, y, z. The connected vector must have three values. In t his example, the runway is in the x-z plane. The y-axis defines the altitude of the plane.13.In the Simulink model, connect the line going to the Scope block labeled Display Position to the Pla ne translation input. After connecting the signals and removing the Scope blocks, your model should loo k similar to the figure shown.14.Double-click the VR Sink block in the Simulink model. Select the View button. A viewer window contai ning the plane's virtual world opens.15.From the Simulation menu of the model file, click Start.A plane, moving right to left, starts down the runway and takes off into the air.Changing the Virtual World Associated with a Simulink BlockSometimes you might want to associate a different virtual world with a Simulink model or connect di fferent signals.After you associate a virtual world with a Simulink model, you can select another virtual world or chan ge signals connected to the virtual world. This procedure assumes that you have connected the Simulink model with a virtual world. See Adding a Virtual Reality Toolbox Block:1.Double-click the VR Sink block in the model. The Block Parameters: VR Sink dialog box opens.2.Click the Browse button. The Select World dialog box opens. Find the directory <matlab root>\toolbox\ vr\vrdemos. Select the file vrtkoff2.wrl, and click Open.3.In the Block Parameters: VR Sink dialog box, click Apply.A VRML tree appears on the right side. Simulink associates a new virtual world with the model.4.On the left of the Plane Transform node, click the plus sign square.The Plane Transform tree expands. Now you can see what characteristics of the plane you can drive from Simulink. This model computes the position.5.In the Plane Transform tree, select the translation field check box. Clear the rotation field check b ox. Click OK. The VR Sink block updates and changes to just one input, the Plane translation. The Virtu al Reality block is ready to use with the new parameters defined.6.Verify that the correct output is connected to your VR Sink block. The output from the VR Signal Expa nder should be connected to the single input.7.Run the simulation again and view the new model in the viewer.Displaying a Virtual World and Starting SimulationThis example explains how to display a simulated virtual world using the Virtual Reality Toolbox vi ewer on your host computer. This is the default and recommended method for viewing virtual worlds. A Simulink window opens with the model of a simple automobile. Automobile trajectory (vehicle position and angle) is viewed in virtual reality:1.In the MATLAB Command Window, type: vrtut1A Simulink window opens with the model of an automobile.A VRML viewer also opens with a three-dimension al model of the virtual world associated with the model.2.Arrange the viewer and Simulink windows on your screen so that they are both visible at the same time.3.In the Simulink window, from the Simulation menu, click Start.The simulation starts and, in the VRML viewer window, a car moves along the mountain e the VRM L viewer controls to move the camera within this virtual world while the simulation is running. For more information on the Virtual Reality Toolbox viewer controls, see Virtual Reality Toolbox Viewer.5.In the Simulink window, from the Simulation menu, click Stop.Opening a Viewer WindowIf you close the viewer window, you might want to reopen it:1.In the Simulink model window, double-click the VR Sink or VR Source block.A Block Parameters dialog box opens.2.Click View. Your default viewer opens and displays the virtual scene. For more information on setting your default viewer, see Setting the Default Viewer of Virtual Scenes.Multiple instances of the viewer can exist on your screen. A viewer appears each time you click View in the Block Parameters dialog box. This feature is particularly useful if you want to view one scene fro m many different viewpoints at the same time.Viewing a Virtual WorldAfter you create a virtual world with VRML code, you can visualize that virtual world with the Virt ual Reality Toolbox viewer or with a VRML-enabled Web browser. The Virtual Reality Toolbox viewer can b e used on all supported platforms and is the preferred method of viewing virtual worlds.This section includes the following topics:●Virtual Reality Toolbox Viewer●blaxxun Contact VRML Plug-inVirtual Reality Toolbox ViewerThe Virtual Reality Toolbox contains a viewer as the default method for viewing virtual worlds. You can use this viewer on any supported operating system. For a list of supported operating systems, see System Requirements. The following topic provides an overview of the features and controls of the viewe r. Open a virtual world by selecting a Virtual Reality demo or by clicking the View button in the Block Parameters dialog box of a Virtual Reality block.Viewpoint ControlThere are three buttons on the control panel that affect the viewpoint of the scene. The center cir cular button resets the camera to the current viewpoint. This button is useful when you have been movin g about the scene and need to reorient yourself. The keyboard equivalents of this button are Home and R. The Esc key resets the camera to the default viewpoint.You can use the right and left arrows associated with viewpoint control to browse through predefine d viewpoints. These buttons are inactive if other viewpoints are not specified by the author. You can a lso use the Page Up and Page Down keys to navigate through these viewpoints.Control MenuAccess the control menu by right-clicking in the viewer window. You can use the control menu to spe cify a predefined viewpoint or change the appearance of the control panel. You can also control the nav igation method, speed, and rendering of the virtual world. For more information about navigation method s, see Navigation. For more information about rendering, see Rendering.Changing the Navigation Speed1.In the viewer window, right-click.2.Point to Navigation.3.Point to Speed, then select Very Slow.Your navigation speed within the virtual world is much slower than before.Consider setting a higher speed for large scenes and a slower speed for more controlled navigation in s maller scenes.RenderingYou can change the rendering of the scene through the control panel or the control menu. The vrpend dem o is used to demonstrate the viewer's functionality.You can turn the antialiasing of the scene on or off. Antialiasing is a technique that attempts to smoo th the appearance of jagged lines. These jagged lines are the result of a printer or monitor's not havi ng enough resolution to represent a line smoothly. When Antialiasing is on, the jagged lines are surrou nded by shades of gray or color. Therefore, the lines appear fuzzy rather than jagged.。
Matlab统计工具箱
Matlab统计工具箱Getting Started Toolbox functions and GUIs Organizing Data Data arrays and groupsDescriptive Statistics Data summariesStatistical Visualization Data patterns and trends Probability Distributions Modeling data frequencyRandom Number Generation Topics in random number generation Hypothesis Tests Inferences from dataAnalysis of Variance Modeling data varianceRegression Analysis Continuous data models Multivariate Methods Visualization and reduction Cluster Analysis Identifying data categories Classification Categorical data modelsMarkov Models Stochastic data modelsDesign of Experiments Systematic data collection Statistical Process Control Production monitoring方差分析ANOVA Operationsanova1One-way analysis of varianceanova2Two-way analysis of varianceanovan N-way analysis of varianceaoctool Interactive analysis of covariance dummyvar Create dummy variablesfriedman Friedman's testkruskalwallis Kruskal-Wallis testmanova1 One-way multivariate analysis of variance manovaclusterDendrogram of group mean clusters following MANOVAmultcompareMultiple comparison test方差分析模型方差分析是分析试验(或观测)数据的一种统计方法。
matlab工具箱下载安装和使用方法的汇总Toolbox大全
matlab工具箱下载安装和使用方法的汇总Toolbox大全Maplesoft《Maple Toolbox for MATLAB》Sergiy Iglin《Graph Theory Toolbox》(图论工具箱)Koert Kuipers《Branch And Bound toolbox 2.0》(BNB20分支定界工具箱)Howard Wilson《Numerical Integration T oolbox》(NIT数值积分工具箱)Anton Zaicenco《FEM toolbox for solid mechanics》(固体力学有限元工具箱)Nicholas J. Higham《The Matrix Computation Toolbox》(矩阵计算工具箱)Paolo Di Prodi《robotic toolbox》(机器人工具箱)Moein Mehrtash《GPS Navigation T oolbox 》(GPS导航工具箱)J.Divahar 《Airfoil_Analyzer_toolbox》(翼型分析工具箱)Rasmus Anthin《Multivariable Calculus T oolbox 》(多变量微积分工具箱)《Time frequency analysis toolbox》(时频分析工具箱)Johan L?fberg《Yet A LMI Package》(YLMIP优化工具箱)NCSU-IE 《Genetic Algorithm Optimization Toolbox 》(GAOT 遗传算法优化工具箱)Dahua Lin《Statistical Learning Toolbox》(统计学习工具箱)Richard Frost《Simulated Annealing Tools 》(satools模拟退火工具箱)陈益《simple genetic algorithms laboratory》(SGALAB简单遗传算法实验室)Eric Debreuve《Active Contour Toolbox》(主动轮廓线工具箱)Alaa Tharwat《Alaa Tharwat ToolBox》(模式识别&数字图像处理工具箱)Brian Birge《Particle Swarm Optimization T oolbox》(PSO粒子群优化工具箱)Hartmut Pohlheim《Genetic and Evolutionary Algorithm toolbox》(遗传和进化工具箱)Gonzalez《DIPUM Toolbox》(数字图像处理工具箱)Jouni Hartikainen《EKF/UKF Toolbox for Matlab》(扩展卡曼滤波工具箱)Frederic Moisy《EzyFit toolbox 2.20》(快速拟合工具箱)Constell,Inc《Constellation T oolbox for Matlab》(星座工具箱和手册)Kevin Murphy《Hidden Markov Model (HMM) T oolbox》(隐马尔可夫模型工具箱)Janos Abonyi《Fuzzy Cluster Analysis Toolbox》(模糊聚类和数据分析工具箱)Ben Barrowes《Mathematica Symbolic Toolbox for MATLAB》《Math modl toolbox》(数学建模工具箱)Zoubin Ghahramani《Machine Learning Toolbox》(机器学习,主要是HMM)Sheffield《genetic arithmetic toolbox》(GATBX遗传算法工具箱)Gerald Recktenwald 《Numerical Methods with MATLAB》(NMM1.5数值分析工具箱)Matlab数据关联规则挖掘的工具箱(箱内含使用手册)分享与讨论Martin Ohlin《TrueTime-1.5 Toolbox》Evan Ruzanski《Comprehensive DSP Toolbox v1.0》(综合数字信号处理工具箱)Minh Do《Contourlet toolbox》(Contourlet变换影像处理工具箱)Mike Brookes《Voice box》(语音处理工具箱)Mike Craymer《Geodetic T oolbox》(大地测量学工具箱)Ian Nabney《Pattern analysis toolbox》(Netlab模式分析工具箱)Gabriel Peyre《Toolbox Fast Marching》(快速步进工具箱)John Buck《Computer Explorations Toolbox》(数字信号和系统工具箱)Eric Debreuve《Active Contour Toolbox》(主动轮廓线工具箱)Rasmus Anthin《Finite Element T oolbox 2.1》(有限元工具箱)。
Maple Toolbox for Matlab 工具箱的使用向导MapleToolboxforMATLAB操
特征细节:
交互式技术文档环境
• 完整的文档组件 ( 文本、数学、图形、动画等 ), 您可以制作专业水平的、图文并茂的技术文件 让您的文件具有可读性和交互性,同时用户可以 捕获结果中的知识。并可以利用这个技术文件。 • 直观的二维数学编辑器,让您编写出印刷水准的 数学文件。
The Maple™ Toolbox for MATLAB®
The Maple Toolbox for MATLAB includes:
Maple 10 - the most powerful and intuitive tool for solving complex mathematical problems and creating rich, executable technical documents. Maple - MATLAB Connector - a two-way link between Maple and MATLAB, enabling users to define variables in either environment and use them in the other.
jacobian - compute the Jacobian matrix symsum - symbolic sum
Polynomial Manipulation
coeffs collect exp expand factor findsym gcd horner lcm mod - extract all coefficients of a multivariate polynomial - collect coefficients - the exponential function - expand - factor a multivariate polynomial - find symbols - greatest common divisor of polynomials - horner form - least common multiple - computation over the integers modulo m
MATLAB的一些有用的工具箱
MATLAB是很多人经常使用的“懒人”编程软件了。
可是大家是不是有时候仍然觉得他的功能不够强大呢?提供给大家一些matlab的软件toolbox,使得大家在做应用的时候更加得心应手吧。
ZSM (zero sum multinomial)/zsmcode.htmlBinaural-modeling software for MATLAB/Windows/home/Michael_Akeroyd/download2.htmlStatistical Parametric Mapping (SPM)/spm/ext/BOOTSTRAP MATLAB TOOLBOX.au/downloads/bootstrap_toolbox.htmlThe DSS package for MATLABDSS Matlab package contains algorithms for performing linear, deflation and symmet ric DSS.http://www.cis.hut.fi/projects/dss/package/Psychtoolbox/download.htmlMultisurface Method Tree with MATLAB/~olvi/uwmp/msmt.htmlA Matlab Toolbox for every single topic !/~baum/toolboxes.htmleg. BrainStorm - MEG and EEG data visualization and processingCLAWPACK is a software package designed to compute numerical solutions to hyper bolic partial differential equations using a wave propagation approach/~claw/Fusetool - Image Fusion Toolboxhttp://www.metapix.de/toolbox.htmTSTOOL is a MATLAB software package for nonlinear time series analysis.TSTOOL can be used for computing: Time-delay reconstruction, Lyapunov exponents, Fractal dimensions, Mutual information, Surrogate data tests, Nearest neighbor stati stics, Return times, Poincare sections, Nonlinear predictionhttp://www.physik3.gwdg.de/tstool/MATLAB / Data description toolboxA Matlab toolbox for data description, outlier and novelty detectionMarch 26, 2004 - D.M.J. Taxhttp://www-ict.ewi.tudelft.nl/~davidt/dd_tools/dd_manual.html。
毕业设计MatlabWEB应用
本科生毕业设计(论文)(2009届)理学院题目:学生姓名:学号:专业名称:班级:指导教师姓名:学科:职称:年月基于生态学习观的管理运筹学网站设计与开发摘要:在互联网已经成熟应用的今天,网站的建设对实现资源共享,信息传播起到重要的作用。
为了让用户更好的处理和解决各种多规划的问题,扩展网站的功能显的刻不容缓。
在基于B/S(Browser/Server结构)结构的情况下,赋予网站处理实际应用程序的功能。
能更好的调试处理程序,从而更有效的发布信息和处理事件的能力。
MatLab(MA Trix LABoratory)有各种处理数算法,矩阵的优势。
开扩MatLab在Web项目下的应用,让用户发布自己的M文件,服务器提供让用户在线调试的扩展功能,同时为了人性化的需求以及数据的存储的高效性,安全性。
涉及到数据库(Microsoft SQL Server 2000)、JS(JavaScript)脚本、CSS(Casc ading Style Sheets层叠样式表)样式和方面的技术。
利用C#( C-based Object Oriented Language)语言在Microsoft V isual Studio 2008结合Microsoft SQL Server 2000 设计与开发,扩展使用MatLab提供的MatLabServer接口来实现大部分的功能需求。
关键字:B/S;MatLab;数据库(SQL);;脚本(JS)Abstract:Already is mature in the Internet application today, the website construction to realizes resources sharing, the information disseminates the vital role.In order to let a user better processing and solves each kind of plan problem, expands urgency which the website the function reveals.In based on B/S (the Browser/srver structure) in the structure situation, entrusts with the website processing practical application procedure the function.Can the better debugging disposal procedure, thus more effective issue information and processing event ability.MatLab (MA Trix LABoratory) has each kind of processing to calculate the law, the matrix superiority.Opens to expand MatLab under the Web project application, lets the user issue own M document, the server provides lets the user online debugging the expansion function, simultaneously for user friendly demand as well as data memory highly effective, security.Involves to the database (Microsoft SQL Server 2000), the JS(JavaScript) script, CSS (Cascading Style Sheets cascading style table) the style and .Aspect technology.(C-based Object Oriented Language) the language 2008 unifies Microsoft SQL using C# in Microsoft V isual Studio the Server 2000 designs and the development, the expansion uses the MatLabServer connection which MatLab provides to realize the majority of function demand.(C-based Object Oriented Language) the language 2008 unifies Microsoft SQL using C# in Microsoft V isual Studio the Server 2000 designs and the development, the expansion uses the MatLabServer connection which MatLab provides to realize the majority of function demand.Key Words:B/S;MatLab; Data Base (SQL);; Script (JS)目录1引言 (4)2网站组成要件概诉 (5)2.1MatLab简介 (5)2.1.1MatLab背景 (5)2.1.2MatLab优势 (5)2.1.3MatLab的Web应用 (6)简介 (7) (7)2.2.2Microsoft Visual Studio (7)2.3SQL简介 (7)2.3.1SQL Server (7)2.4其他要素 (8)2.4.1JS (8)2.4.2CSS (8)2.4.3XML (9)3需求分析及其数据库的设计 (9)3.1需求分析 (9)3.2数据库的设计与实现 (10)4网站设计与实现的技术要点 (14)4.1基本要点 (14)4.1.1WebConfig配置文件 (14)4.1.2HTML XML ASPX的区别及其应用 (15)4.1.3URL的重写和伪静态技术 (16)4.1.4Session、ViewState、Application (17)4.1.5传值 (18)4.2AJAX4.2.1 AJAX简介 (18)4.2.2 AJAX几种应用方式 (18)4.3数据库基本使用方式 (20)4.3.1数据读取方式 (20)4.3.2数据库的操作 (21)4.4对服务器文件的操作 (22)4.4.1文件的复制 (23)4.4.2文件的删除 (24)4.4.3文档的编写 (25)5网站具体的页面实现案例 (25)5.1Base.cs类 (25)5.2AspxToHtml.cs类 (27)5.3注册页面 (28)5.4文章的发布页 (29)5.5MatLab调试页面 (29)6网站的结论以及不足 (30)论文正文1引言运筹学是一门寻求在给定资源条件下,如何设计和运行一个系统的科学决策的方法,是人类对各种广义资源的运用及筹划活动的一门新兴学科,目前,运筹学是既是管理科学的一个重要组成部分,又是数学、计算机等学科的重要分支,它是现代管理科学中的一种基础理论和不可缺少的方法、手段和工具;也是抽象的数学理论和丰富多彩的实践相结合的“桥梁”,它为从事生产社会实践和应用科学研究的工作人员提供了完整的数学方法,也为从事数学等理论研究的科研人员提供了广阔的应用领域,运筹学的广泛应用使得数学理论方法和生产社会实践在深度和广度上达到了“双赢”的效果。
参数自寻优模糊控制器优化方法的研究
参数自寻优模糊控制器优化方法的研究摘要模糊控制是智能控制的一个重要分支,其实质是对人观察,思考,判断,决策的思维过程的一种模拟。
常规模糊控制器设计简单,易于实现,有着广泛的应用。
但因模糊控制器的设计在很大程度上依赖于设计者的实践经验,带有相当的主观性。
因此,对于一个特定的被控对象,需要借助某种手段对控制器进行优化才能取得较为满意的设计效果。
而改善模糊控制性能的最有效方法是优化模糊控制器的控制规则和有关参数。
本文提出了一种基于MATLAB的模糊控制器综合优化方法。
该方法首先利用MATLAB中的模糊系统工具箱结合MATLAB函数构建控制规则可调整的模糊控制器,然后利用最优化工具箱优化模糊控制器的控制规则和参数,从而提高模糊控制器的控制性能。
最后利用仿真连接器建立系统仿真模型并在单位阶跃输入信号作用下仿真分析系统动态性能和优化设计结果。
仿真表明控制规则及参数优化后系统阶跃响应特性基本上能达到快速小超调的设计目标。
关键词:模糊控制;优化;MATLAB;仿真Rearch on Optimization Method of Fuzzy controller basedon Parameters self-optimizingAbstractFuzzy control is an important branch of the intelligent control.The essence is a simulation to the process of human thinking of observation, thinking, judgement and decision-making. Conventional fuzzy controller is easy to design and implement,and has a wide range of applications. But the design of fuzzy controller mostly relies on the designers’practical experience, with considerable subjectivity.Therefore, a specific object,needs to be optimized to achieve relatively satisfied with the design effect. And the most effective way of improve the performance of fuzzy control is optimizing fuzzy controller control rules and the relevant parameters.It is presented in this paper a comprehensive optimization method of the fuzzy controller. The method based on MATLAB and digital simulation analysis includes three steps: firstly it uses fuzzy control system toolbox and MATLAB function to construct a fuzzy controller with adjustable control rules; secondly, it optimizes the control rules and parameters of the fuzzy controller by the optimum toolbox; thirdly, with the simulation linker, it builds an smulation model of a second-order system with delay and analyzes the dynamic characteristics of the whole system according to the step response. The simulation results show that the system can meet the target of quick and none-overshoot and design the fuzzy controller with high efficiency.Key words: fuzzy control;optimization;MATLAB;simulation目录摘要 (I)Abstract (II)目录 (1)1 绪论 (1)1.1论文的选题背景 (1)1.2论文的研究意义 (1)1.3模糊控制应用研究的现状及发展 (1)1.4课题的主要内容 (2)2 模糊控制数学基础 (3)2.1 模糊子集与运算 (3)2.2 模糊推理 (4)2.2.1 模糊条件语句 (4)2.2.2 模糊推理 (5)3 基本模糊控制器的设计与建立 (8)3.1精确量的模糊化 (8)3.1.1 模糊控制器的语言变量 (8)3.1.2 量化因子与比例因子 (8)3.1.3语言变量值的选取 (9)3.2模糊控制算法的设计 (10)3.2.1常见的模糊控制规则 (10)3.2.2反映控制规则的模糊关系 (11)3.3输出信息的模糊判决 (11)3.4基于MATLAB的模糊控制器的实现方法 (11)3.4.1 基于模糊系统工具箱图形用户界面(GUI)的模糊控制器设计.. 123.4.2 用MATLAB语言编程的方法实现模糊控制系统的设计 (16)3.5 模糊控制系统的仿真模型 (17)3.5.1建立模糊控制系统的仿真模型 (17)3.5.2 系统仿真 (18)4 参数可调模糊控制器的设计与建立 (20)4.1 模糊控制规则的调整 (20)4.2 目标函数的选取 (22)4.3参数优化模糊控制器的建立 (23)4.4模糊控制器优化设计仿真模型 (25)5结论 (27)致谢 (28)参考文献 (29)1 绪论1.1论文的选题背景模糊控制是以模糊集合理论为基础的一种新兴的控制手段,它是模糊系统理论和模糊技术与自动控制技术相结合的产物。
Matlab中的mpi工具箱MATLAB Laboratory for MPI toolbox (MPITB)
2.5
Boot up the parallel architecture using LAMBOOT
Use the command lamboot -v to boot up the LAM topology. lamboot -v Please make sure that the words topology done was reported after you run the above command. You may double check using ’ps -ef | grep lamd’ to see your process running. Contragulation, you have prepared a parallel architecture for computing. Once you finished, remember to clean up the topology by lamhalt, lamclean or wipe.
For workstations in the Scientific Computing Laboratory T713, in the subject homepage, download the file MC-scilab.tar.gz and place it in your home directory. Uncompress and untar it with the following command, tar xzvf MC-scilab.tar.gz the directory matlab/MC will be created and stored the work examples. In additions, the hostfile named lambhost and a file named bashrc.mpitb will appear in the home directory. For the PC cluster, the above files has already been prepared and placed in the student accounts assigned to you. You may also download the file MC-cluster.tar.gz and untar as above.
a MATLAB Toolbox for Optimization over Symmetric Cones
SeDuMi stands for Self-Dual-Minimization: it implements the self-dual embedding technique for optimization over self-dual homogeneous cones. The self-dual embedding technique as proposed Ye, Todd and Mizuno 23], essentially makes it possible to solve certain optimization problems in a single phase, leading either to an optimal solution, or a certi cate of infeasibility. Optimization over self{dual homogeneous cones, or more concisely, optimization over symmetric cones, was rst studied by Nesterov and Todd 16], and is currently an active area of research.
has a theoretically proven O(pn log(1= )) worst-case iteration bound,
can import linear programs in MPS format (via a link with LIPSOL 24]), and semide nite programs in SDPA 8] format. It is also possible to convert optimization problems from SDPPack 1] format into SeDuMi.
matlab工具箱介绍
matlab工具箱介绍MATLAB有三十多个工具箱大致可分为两类:功能型工具箱和领域型工具箱.功能型工具箱主要用来扩充MATLAB的符号计算功能、图形建模仿真功能、文字处理功能以及与硬件实时交互功能,能用于多种学科。
而领域型工具箱是专业性很强的。
如控制系统工具箱(Control System Toolbox)、信号处理工具箱(Signal Processing Toolbox)、财政金融工具箱(Financial Toolbox)等。
下面,将MATLAB工具箱内所包含的主要内容做简要介绍:1)通讯工具箱(Communication Toolbox)。
令提供100多个函数和150多个SIMULINK模块用于通讯系统的仿真和分析——信号编码——调制解调——滤波器和均衡器设计——通道模型——同步可由结构图直接生成可应用的C语言源代码。
2)控制系统工具箱(Control System Toolbox)。
鲁连续系统设计和离散系统设计* 状态空间和传递函数* 模型转换* 频域响应:Bode图、Nyquist图、Nichols图* 时域响应:冲击响应、阶跃响应、斜波响应等* 根轨迹、极点配置、LQG3)财政金融工具箱(FinancialTooLbox)。
* 成本、利润分析,市场灵敏度分析* 业务量分析及优化* 偏差分析* 资金流量估算* 财务报表4)频率域系统辨识工具箱(Frequency Domain System ldentification Toolbox* 辨识具有未知延迟的连续和离散系统* 计算幅值/相位、零点/极点的置信区间* 设计周期激励信号、最小峰值、最优能量诺等5)模糊逻辑工具箱(Fuzzy Logic Toolbox)。
* 友好的交互设计界面* 自适应神经—模糊学习、聚类以及Sugeno推理* 支持SIMULINK动态仿真* 可生成C语言源代码用于实时应用(6)高阶谱分析工具箱(Higher—Order SpectralAnalysis Toolbox* 高阶谱估计* 信号中非线性特征的检测和刻画* 延时估计* 幅值和相位重构* 阵列信号处理* 谐波重构(7)图像处理工具箱(Image Processing Toolbox)。
MATLAB常用工具箱
MATLAB常用工具箱常用工具箱MATLAB包括拥有数百个内部函数的主包和三十几种工具包。
工具包又可以分为功能性工具包和学科工具包。
功能工具包用来扩充MATLAB的符号计算,可视化建模仿真,文字处理及实时控制等功能。
学科工具包是专业性比较强的工具包,控制工具包,信号处理工具包,通信工具包等都属于此类。
开放性使MATLAB广受用户欢迎。
除内部函数外,所有MATLAB主包文件和各种工具包都是可读可修改的文件,用户通过对源程序的修改或加入自己编写程序构造新的专用工具包。
Matlab Main Toolbox——matlab主工具箱Control System Toolbox——控制系统工具箱Communication Toolbox——通讯工具箱Financial Toolbox——财政金融工具箱System Identification Toolbox——系统辨识工具箱Fuzzy Logic Toolbox——模糊逻辑工具箱Higher-Order Spectral Analysis Toolbox——高阶谱分析工具箱Image Processing Toolbox——图象处理工具箱LMI Control Toolbox——线性矩阵不等式工具箱Model predictive Control Toolbox——模型预测控制工具箱μ-Analysis and Synthesis Toolbox——μ分析工具箱Neural Network Toolbox——神经网络工具箱Optimization Toolbox——优化工具箱Partial Differential Toolbox——偏微分方程工具箱Robust Control Toolbox——鲁棒控制工具箱Signal Processing Toolbox——信号处理工具箱Spline Toolbox——样条工具箱Statistics Toolbox——统计工具箱Symbolic Math Toolbox——符号数学工具箱Simulink Toolbox——动态仿真工具箱Wavele Toolbox——小波工具箱常用函数Matlab内部常数[3]eps:浮点相对精度exp:自然对数的底数ei或j:基本虚数单位inf或Inf:无限大,例如1/0nan或NaN:非数值(Not a number),例如0/0 pi:圆周率p(= 3.1415926...)realmax:系统所能表示的最大数值realmin:系统所能表示的最小数值nargin:函数的输入引数个数nargout:函数的输出引数个数lasterr:存放最新的错误信息lastwarn:存放最新的警告信息MATLAB常用基本数学函数abs(x):纯量的绝对值或向量的长度angle(z):复数z的相角(Phase angle)sqrt(x):开平方real(z):复数z的实部imag(z):复数z的虚部conj(z):复数z的共轭复数round(x):四舍五入至最近整数fix(x):无论正负,舍去小数至最近整数floor(x):下取整,即舍去正小数至最近整数ceil(x):上取整,即加入正小数至最近整数rat(x):将实数x化为多项分数展开rats(x):将实数x化为分数表示sign(x):符号函数(Signum function)。
matlab统计工具箱函数
% Statistics Toolbox% betafit - Beta parameter estimation.% binofit - Binomial parameter estimation.% dfittool - Distribution fitting tool.% evfit - Extreme value parameter estimation.% expfit - Exponential parameter estimation.% gamfit - Gamma parameter estimation.% lognfit - Lognormal parameter estimation.% mle - Maximum likelihood estimation (MLE).% mlecov - Asymptotic covariance matrix of MLE. % nbinfit - Negative binomial parameter estimation. % normfit - Normal parameter estimation.% poissfit - Poisson parameter estimation.% raylfit - Rayleigh parameter estimation.% unifit - Uniform parameter estimation.% wblfit - Weibull parameter estimation.%% Probability density functions (pdf).% betapdf - Beta density.% binopdf - Binomial density.% chi2pdf - Chi square density.% evpdf - Extreme value density.% exppdf - Exponential density.% fpdf - F density.% gampdf - Gamma density.% geopdf - Geometric density.% hygepdf - Hypergeometric density.% lognpdf - Lognormal density.% mvnpdf - Multivariate normal density.% nbinpdf - Negative binomial density.% ncfpdf - Noncentral F density.% nctpdf - Noncentral t density.% ncx2pdf - Noncentral Chi-square density.% normpdf - Normal (Gaussian) density.% pdf - Density function for a specified distribution. % poisspdf - Poisson density.% raylpdf - Rayleigh density.% tpdf - T density.% unidpdf - Discrete uniform density.% unifpdf - Uniform density.% wblpdf - Weibull density.%% Cumulative Distribution functions (cdf).% betacdf - Beta cdf.% binocdf - Binomial cdf.% cdf - Specified cumulative distribution function.% chi2cdf - Chi square cdf.% ecdf - Empirical cdf (Kaplan-Meier estimate).% evcdf - Extreme value cumulative distribution function. % expcdf - Exponential cdf.% fcdf - F cdf.% gamcdf - Gamma cdf.% geocdf - Geometric cdf.% hygecdf - Hypergeometric cdf.% logncdf - Lognormal cdf.% nbincdf - Negative binomial cdf.% ncfcdf - Noncentral F cdf.% nctcdf - Noncentral t cdf.% ncx2cdf - Noncentral Chi-square cdf.% normcdf - Normal (Gaussian) cdf.% poisscdf - Poisson cdf.% raylcdf - Rayleigh cdf.% tcdf - T cdf.% unidcdf - Discrete uniform cdf.% unifcdf - Uniform cdf.% wblcdf - Weibull cdf.%% Critical Values of Distribution functions.% betainv - Beta inverse cumulative distribution function.% binoinv - Binomial inverse cumulative distribution function.% chi2inv - Chi square inverse cumulative distribution function.% evinv - Extreme value inverse cumulative distribution function.% expinv - Exponential inverse cumulative distribution function.% finv - F inverse cumulative distribution function.% gaminv - Gamma inverse cumulative distribution function.% geoinv - Geometric inverse cumulative distribution function.% hygeinv - Hypergeometric inverse cumulative distribution function. % icdf - Specified inverse cdf.% logninv - Lognormal inverse cumulative distribution function.% nbininv - Negative binomial inverse distribution function.% ncfinv - Noncentral F inverse cumulative distribution function.% nctinv - Noncentral t inverse cumulative distribution function.% ncx2inv - Noncentral Chi-square inverse distribution function.% norminv - Normal (Gaussian) inverse cumulative distribution function. % poissinv - Poisson inverse cumulative distribution function.% raylinv - Rayleigh inverse cumulative distribution function.% tinv - T inverse cumulative distribution function.% unidinv - Discrete uniform inverse cumulative distribution function.% unifinv - Uniform inverse cumulative distribution function. % wblinv - Weibull inverse cumulative distribution function. %% Random Number Generators.% betarnd - Beta random numbers.% binornd - Binomial random numbers.% chi2rnd - Chi square random numbers.% evrnd - Extreme value random numbers.% exprnd - Exponential random numbers.% frnd - F random numbers.% gamrnd - Gamma random numbers.% geornd - Geometric random numbers.% hygernd - Hypergeometric random numbers.% iwishrnd - Inverse Wishart random matrix.% lognrnd - Lognormal random numbers.% mvnrnd - Multivariate normal random numbers.% mvtrnd - Multivariate t random numbers.% nbinrnd - Negative binomial random numbers.% ncfrnd - Noncentral F random numbers.% nctrnd - Noncentral t random numbers.% ncx2rnd - Noncentral Chi-square random numbers.% normrnd - Normal (Gaussian) random numbers.% poissrnd - Poisson random numbers.% randg - Gamma random numbers (unit scale).% random - Random numbers from specified distribution. % randsample - Random sample from finite population. % raylrnd - Rayleigh random numbers.% trnd - T random numbers.% unidrnd - Discrete uniform random numbers.% unifrnd - Uniform random numbers.% wblrnd - Weibull random numbers.% wishrnd - Wishart random matrix.%% Statistics.% betastat - Beta mean and variance.% binostat - Binomial mean and variance.% chi2stat - Chi square mean and variance.% evstat - Extreme value mean and variance.% expstat - Exponential mean and variance.% fstat - F mean and variance.% gamstat - Gamma mean and variance.% geostat - Geometric mean and variance.% hygestat - Hypergeometric mean and variance.% lognstat - Lognormal mean and variance.% nbinstat - Negative binomial mean and variance.% ncfstat - Noncentral F mean and variance.% nctstat - Noncentral t mean and variance.% ncx2stat - Noncentral Chi-square mean and variance.% normstat - Normal (Gaussian) mean and variance.% poisstat - Poisson mean and variance.% raylstat - Rayleigh mean and variance.% tstat - T mean and variance.% unidstat - Discrete uniform mean and variance.% unifstat - Uniform mean and variance.% wblstat - Weibull mean and variance.%% Likelihood functions.% betalike - Negative beta log-likelihood.% evlike - Negative extreme value log-likelihood.% explike - Negative exponential log-likelihood.% gamlike - Negative gamma log-likelihood.% lognlike - Negative lognormal log-likelihood.% nbinlike - Negative likelihood for negative binomial distribution. % normlike - Negative normal likelihood.% wbllike - Negative Weibull log-likelihood.%% Descriptive Statistics.% bootstrp - Bootstrap statistics for any function.% corr - Linear or rank correlation coefficient.% corrcoef - Linear correlation coefficient with confidence intervals. % cov - Covariance.% crosstab - Cross tabulation.% geomean - Geometric mean.% grpstats - Summary statistics by group.% harmmean - Harmonic mean.% iqr - Interquartile range.% kurtosis - Kurtosis.% mad - Median Absolute Deviation.% mean - Sample average (in MATLAB toolbox).% median - 50th percentile of a sample.% moment - Moments of a sample.% nanmax - Maximum ignoring NaNs.% nanmean - Mean ignoring NaNs.% nanmedian - Median ignoring NaNs.% nanmin - Minimum ignoring NaNs.% nanstd - Standard deviation ignoring NaNs.% nansum - Sum ignoring NaNs.% nanvar - Variance ignoring NaNs.% prctile - Percentiles.% quantile - Quantiles.% range - Range.% skewness - Skewness.% std - Standard deviation (in MATLAB toolbox).% tabulate - Frequency table.% trimmean - Trimmed mean.% var - Variance (in MATLAB toolbox).%% Linear Models.% addedvarplot - Created added-variable plot for stepwise regression. % anova1 - One-way analysis of variance.% anova2 - Two-way analysis of variance.% anovan - n-way analysis of variance.% aoctool - Interactive tool for analysis of covariance.% dummyvar - Dummy-variable coding.% friedman - Friedman's test (nonparametric two-way anova).% glmfit - Generalized linear model fitting.% glmval - Evaluate fitted values for generalized linear model.% kruskalwallis - Kruskal-Wallis test (nonparametric one-way anova). % leverage - Regression diagnostic.% lscov - Least-squares estimates with known covariance matrix.% lsqnonneg - Non-negative least-squares.% manova1 - One-way multivariate analysis of variance.% manovacluster - Draw clusters of group means for manova1.% multcompare - Multiple comparisons of means and other estimates. % polyconf - Polynomial evaluation and confidence interval estimation. % polyfit - Least-squares polynomial fitting.% polyval - Predicted values for polynomial functions.% rcoplot - Residuals case order plot.% regress - Multivariate linear regression.% regstats - Regression diagnostics.% ridge - Ridge regression.% robustfit - Robust regression model fitting.% rstool - Multidimensional response surface visualization (RSM).% stepwise - Interactive tool for stepwise regression.% stepwisefit - Non-interactive stepwise regression.% x2fx - Factor settings matrix (x) to design matrix (fx).%% Nonlinear Models.% nlinfit - Nonlinear least-squares data fitting.% nlintool - Interactive graphical tool for prediction in nonlinear models. % nlpredci - Confidence intervals for prediction.% nlparci - Confidence intervals for parameters.%% Design of Experiments (DOE).% bbdesign - Box-Behnken design.% candexch - D-optimal design (row exchange algorithm for candidate set). % candgen - Candidates set for D-optimal design generation.% ccdesign - Central composite design.% cordexch - D-optimal design (coordinate exchange algorithm).% daugment - Augment D-optimal design.% dcovary - D-optimal design with fixed covariates.% ff2n - Two-level full-factorial design.% fracfact - Two-level fractional factorial design.% fullfact - Mixed-level full-factorial design.% hadamard - Hadamard matrices (orthogonal arrays).% lhsdesign - Latin hypercube sampling design.% lhsnorm - Latin hypercube multivariate normal sample.% rowexch - D-optimal design (row exchange algorithm).%% Statistical Process Control (SPC).% capable - Capability indices.% capaplot - Capability plot.% ewmaplot - Exponentially weighted moving average plot.% histfit - Histogram with superimposed normal density.% normspec - Plot normal density between specification limits. % schart - S chart for monitoring variability.% xbarplot - Xbar chart for monitoring the mean.%% Multivariate Statistics.% Cluster Analysis.% cophenet - Cophenetic coefficient.% cluster - Construct clusters from LINKAGE output.% clusterdata - Construct clusters from data.% dendrogram - Generate dendrogram plot.% inconsistent - Inconsistent values of a cluster tree.% kmeans - k-means clustering.% linkage - Hierarchical cluster information.% pdist - Pairwise distance between observations.% silhouette - Silhouette plot of clustered data.% squareform - Square matrix formatted distance.%% Dimension Reduction Techniques.% factoran - Factor analysis.% pcacov - Principal components from covariance matrix.% pcares - Residuals from principal components.% princomp - Principal components analysis from raw data.% rotatefactors - Rotation of FA or PCA loadings.%% Plotting.% andrewsplot - Andrews plot for multivariate data.% biplot - Biplot of variable/factor coefficients and scores.% glyphplot - Plot stars or Chernoff faces for multivariate data.% gplotmatrix - Matrix of scatter plots grouped by a common variable. % parallelcoords - Parallel coordinates plot for multivariate data.%% Other Multivariate Methods.% barttest - Bartlett's test for dimensionality.% canoncorr - Cannonical correlation analysis.% cmdscale - Classical multidimensional scaling.% classify - Linear discriminant analysis.% mahal - Mahalanobis distance.% manova1 - One-way multivariate analysis of variance.% mdscale - Metric and non-metric multidimensional scaling.% procrustes - Procrustes analysis.%% Decision Tree Techniques.% treedisp - Display decision tree.% treefit - Fit data using a classification or regression tree.% treeprune - Prune decision tree or creating optimal pruning sequence. % treetest - Estimate error for decision tree.% treeval - Compute fitted values using decision tree.%% Hypothesis Tests.% ranksum - Wilcoxon rank sum test (independent samples).% signrank - Wilcoxon sign rank test (paired samples).% signtest - Sign test (paired samples).% ztest - Z test.% ttest - One sample t test.% ttest2 - Two sample t test.%% Distribution Testing.% jbtest - Jarque-Bera test of normality% kstest - Kolmogorov-Smirnov test for one sample% kstest2 - Kolmogorov-Smirnov test for two samples% lillietest - Lilliefors test of normality%% Nonparametric Functions.% friedman - Friedman's test (nonparametric two-way anova).% kruskalwallis - Kruskal-Wallis test (nonparametric one-way anova).% ksdensity - Kernel smoothing density estimation.% ranksum - Wilcoxon rank sum test (independent samples).% signrank - Wilcoxon sign rank test (paired samples).% signtest - Sign test (paired samples).%% Hidden Markov Models.% hmmdecode - Calculate HMM posterior state probabilities.% hmmestimate - Estimate HMM parameters given state information.% hmmgenerate - Generate random sequence for HMM.% hmmtrain - Calculate maximum likelihood estimates for HMM parameters. % hmmviterbi - Calculate most probable state path for HMM sequence.%% Statistical Plotting.% andrewsplot - Andrews plot for multivariate data.% biplot - Biplot of variable/factor coefficients and scores.% boxplot - Boxplots of a data matrix (one per column).% cdfplot - Plot of empirical cumulative distribution function.% ecdfhist - Histogram calculated from empirical cdf.% fsurfht - Interactive contour plot of a function.% gline - Point, drag and click line drawing on figures.% glyphplot - Plot stars or Chernoff faces for multivariate data.% gname - Interactive point labeling in x-y plots.% gplotmatrix - Matrix of scatter plots grouped by a common variable.% gscatter - Scatter plot of two variables grouped by a third.% hist - Histogram (in MATLAB toolbox).% hist3 - Three-dimensional histogram of bivariate data.% lsline - Add least-square fit line to scatter plot.% normplot - Normal probability plot.% parallelcoords - Parallel coordinates plot for multivariate data.% probplot - Probability plot.% qqplot - Quantile-Quantile plot.% refcurve - Reference polynomial curve.% refline - Reference line.% surfht - Interactive contour plot of a data grid.% wblplot - Weibull probability plot.%% Statistics Demos.% aoctool - Interactive tool for analysis of covariance.% disttool - GUI tool for exploring probability distribution functions.% polytool - Interactive graph for prediction of fitted polynomials.% randtool - GUI tool for generating random numbers.% rsmdemo - Reaction simulation (DOE, RSM, nonlinear curve fitting).% robustdemo - Interactive tool to compare robust and least squares fits. %% File Based I/O.% tblread - Read in data in tabular format.% tblwrite - Write out data in tabular format to file.% tdfread - Read in text and numeric data from tab-delimitted file.% caseread - Read in case names.% casewrite - Write out case names to file.%% Utility Functions.% combnk - Enumeration of all combinations of n objects k at a time. % grp2idx - Convert grouping variable to indices and array of names. % hougen - Prediction function for Hougen model (nonlinear example). % statget - Get STATS options parameter value.% statset - Set STATS options parameter value.% tiedrank - Compute ranks of sample, adjusting for ties.% zscore - Normalize matrix columns to mean 0, variance 1.% Other Utility Functions.% betalik1 - Computation function for negative beta log-likelihood.% boxutil - Utility function for boxplot.% cdfcalc - Computation function for empirical cdf.% dfgetset - Getting and setting dfittool parameters.% dfswitchyard - Invoking private functions for dfittool.% distchck - Argument checking for cdf, pdf and inverse functions.% export2wsdlg - Dialog to export data from gui to workspace.% iscatter - Grouped scatter plot using integer grouping.% meansgraph - Interactive means graph for multiple comparisons. % statdisptable - Display table of statistics.%% HTML Demo Functions.% classdemo - Classification demo.% clusterdemo - Cluster analysis demo.% cmdscaledemo - Classical multidimensional scaling demo.% copulademo - Copula simulation demo.% customdist1demo - Custom distribution fitting demo.% customdist2demo - Custom distribution fitting demo.% factorandemo - Factor analysis demo.% glmdemo - Generalized linear model demo.% gparetodemo - Generalized Pareto fitting demo.% mdscaledemo - Non-classical multidimensional scaling demo. % mvplotdemo - Multidimensional data plotting demo.% samplesizedemo - Sample size calculation demo.% survivaldemo - Survival data analysis demo.%% Obsolete Functions% weibcdf - Weibull cdf, old parameter definitions.% weibfit - Weibull fitting, old parameter definitions.% weibinv - Weibull inv cdf, old parameter definitions.% weiblike - Weibull likelihood, old parameter definitions.% weibpdf - Weibull pdf, old parameter definitions.% weibplot - Weibull prob plot, old parameter definitions.% weibrnd - Weibull random numbers, old parameter definitions. % weibstat - Weibull statistics, old parameter definitions.。
Matlab的第三方工具箱全套整合(强烈推荐)
Complex- for estimating temporal and spatial signal complexities
Computational Statistics
Coral- seismic waveform analysis
2007-8-2915:04
#1
littleboy
助理工程师
精华0
积分49
帖子76
水位164
技术分0
JMatLink- Matlab Java classes
Kalman- Bayesian Kalman filter
Kalman Filter- filtering, smoothing and parameter estimation (using EM) for linear dynamical systems
DMsuite- differentiation matrix suite
DMTTEQ- design and test time domain equalizer design methods
DrawFilt- drawing digitaland analog filters
DSFWAV- spline interpolation with Dean wave solutions
FSBOX- stepwise forward and backward selection of features using linear regression
GABLE- geometric algebra tutorial
GAOT- genetic algorithm optimization
信号与系统基础-应用WEB和MATLAB第三版英文影印版课后练习题含答案
信号与系统基础-应用WEB和MATLAB第三版英文影印版课后练习题含答案简介《信号与系统基础-应用WEB和MATLAB第三版》是一本介绍信号与系统基础理论及其在工程中应用的教材。
本书作者结合MATLAB软件及其工具箱来讲解教材,实现了理论和实践的结合。
为了深入学习信号与系统,本书配有大量课后习题,可有效帮助读者巩固和应用所学的理论知识。
本文为您提供该书的英文影印版课后习题答案,方便您学习和参考。
目录Chapter 11.1 信号的分类1. 什么是信号?信号是指在时间或空间上发生变化的物理量,包括声音、光、电等。
2. 信号的分类信号可根据其时间性质、频率性质、波形等特征进行分类。
其中,时间性质将信号分为连续时间信号和离散时间信号;频率性质将信号分为周期信号和非周期信号;波形将信号分为分段常值信号、线性信号、非线性信号等。
Chapter 22.1 系统的概念1. 什么是系统?系统是指由若干个元件组成的整体,它们相互作用,从而实现一定功能的。
在信号与系统中,系统可分为线性系统和非线性系统,以及时变系统和时不变系统等。
2. 系统的分类系统可根据其时变性质、线性性质、因果性质、稳定性质等特征进行分类。
其中,线性时不变系统(简称LTI系统)占据了信号与系统中相当重要的地位。
结论通过以上目录,我们可以发现,信号与系统是一门重要的学科,为电子与通信领域提供了核心知识。
而《信号与系统基础-应用WEB和MATLAB第三版》借助MATLAB软件实现理论与实践的结合,使得学习更加直观、丰富。
本文提供该书英文影印版的课后习题答案,希望能够对您的学习有所帮助。
matlabwebwrite示例
matlabwebwrite示例【1.MATLAB Webwrite 简介】MATLAB Webwrite 是一款基于MATLAB 的Web 应用程序,它允许用户在Web 上创建、编辑和共享MATLAB 文件。
通过使用Webwrite,您可以轻松地将MATLAB 代码应用于Web 环境,实现数据分析和可视化的在线协作。
MATLAB Webwrite 适用于教育、研究和企业场景,使得MATLAB 资源更加广泛地应用于各个领域。
【2.MATLAB Webwrite 安装与设置】要使用MATLAB Webwrite,首先需要在您的计算机上安装MATLAB。
安装完成后,通过以下步骤进行Webwrite 的设置:1.打开MATLAB,输入`webwrite` 命令;2.按照提示输入您的MATLAB 许可证服务器地址;3.完成设置后,您可以在MATLAB 命令窗口中输入`webwrite` 命令,查看已安装的Webwrite 应用程序。
【3.MATLAB Webwrite 基本功能与应用】MATLAB Webwrite 提供了丰富的功能,帮助您在Web 上轻松创建和编辑MATLAB 文件。
以下是一些基本功能与应用:1.创建新的MATLAB 文件或打开现有的文件;2.编辑MATLAB 代码,支持语法高亮和自动补全;3.添加和删除变量,支持数据可视化;4.运行MATLAB 代码,查看实时结果;5.保存和下载MATLAB 文件;6.共享文件,实现多人实时协作;7.在线交流,支持实时讨论和提问。
【4.MATLAB Webwrite 高级功能与技巧】除了基本功能外,MATLAB Webwrite 还具备一些高级功能和技巧,提高您的使用体验:1.使用快捷键进行快速操作;2.自定义编辑器的主题和布局;3.设置代码模板,提高代码质量;4.使用代码片段,简化重复任务;5.集成其他MATLAB 工具箱,扩展功能范围。
【5.总结与建议】MATLAB Webwrite 是一款实用的在线MATLAB 编程工具,适用于各种场景。
matgrap绘图软件
MATGRAPH:A MATLAB TOOLBOX FOR GRAPH THEORYEDW ARD R.SCHEINERMANO VERVIEWM ATGRAPH is a toolbox for working with simple1graphs in MATLAB.The goal is to make interactive graph theory ex-ploration simple and efficient.In order to use this toolbox,you need a copy of MATLAB, available from The MathWorks.A few of the M ATGRAPH functions require the additional Optimization Toolbox,also available from The MathWorks.This document gives an overview of the M ATGRAPH tool-box.More information can be found in the accompanying web pages(see§3).In addition to providing a graph class,M ATGRAPH also defines helper classes for working with permutations(see§4) and partitions(see§5).1.G ETTING M ATGRAPH1.1.Download and install.M ATGRAPH is available for free from my web site.Go to/˜ers/matgraphand select the link in the sentence“You can download Mat-graph by clicking here.”This should cause thefile matgraph-X.X.tgz to be down-loaded to your computer.(The X.X is the version number.) This is a compressed archive.To unpack on a UNIX system, give the commandtar xfz matgraph-X.X.tgz(where X.X is replaced by the correct version number).On other computers,double clicking on thefile’s icon should serve the same purpose.This should create a directory named matgraph.You may move this directory to any convenient location on your hard drive.1.2.License.This software is copyrighted by Edward R.Scheinerman and released free of charge under the GNU General Purpose Licenses.A copy of this license can be found at/licenses/gpl.htmlI would like to make this tool as useful to as many people as possible.I invite you to send me improvements for the current .mfiles as well as new.mfiles for added functionality.2.U SING M ATGRAPH2.1.Basic principles.We assume the reader is familiar with MATLAB.Before we discuss how to use M ATGRAPH,it is crucial that the following basic principles be understood.•All graphs handled by M ATGRAPH are simple andundirected.That is,these graphs do not have loopsor multiple edges.Each pair of distinct vertices eitheris not adjacent or else is joined by a single edge.•The vertex set of all graphs in M ATGRAPH is alwaysof the form{1,2,...,n}where n≥0is the number ofvertices in the graph.An important consequence of this is that when a vertex is deleted from a graph,all vertices with highervalue are renumbered.•All graphs in M ATGRAPH are specially defined graphobjects.They do not behave in the same manner as,say,matrices in MATLAB.For the sake of efficiency,M ATGRAPH functions are capable of modifying their arguments.Most MATLAB functions use call by value seman-tics.That is,a copy of the argument is sent to the func-tion.For example,suppose we have a function named func defined in afile func.m.In MATLAB,issuing the command func(A)does not affect the value held in the ordinary variable A.M ATGRAPH,however,is designed differently. Function arguments of type graph use call by refer-ence semantics.This means that a command such as add(g,2,4)can modify the graph g(in this case,by adding an edge joining vertices2and4).Not all M ATGRAPH functions modify their argu-ments,but they all use call by reference for graph ar-guments.For functions that are capable of modifying graphs,the graph that is modified is always thefirst2ED SCHEINERMANargument to the function.For example,M ATGRAPHprovides a line_graph function.The commandline_graph(g,h)overwrites g with the line graph of h.The graph h isnot affected.For more detail,see§2.3.•As a consequence of how graphs are stored inmatgraph,the only time a graph variable should ap-pear on the left hand side of an assignment statementis when the variable is initialized like this:g=graphAt no other time should a graph variable appear to theleft of an equal sign.2.2.Starting M unch MATLAB and be sure that the M ATGRAPH directory is visible on MATLAB’s path. This can be done with MATLAB’s addpath function.For ex-ample:addpath(’/home/betty/programming/matgraph/’) assuming Betty placed the matgraph directory inside a folder named programming on her computer.The next step is to initialize the M ATGRAPH system.This is done by giving the following command:graph_initThis sets up hidden data structures(see§6)used by M AT-GRAPH.MATLAB responds:Graph system initialized.Number of slots=500. M ATGRAPH is now ready to work with graphs.By default, the system can handle500different graphs.This should be adequate for most purposes.However,if you need an array of,say,1000graphs,then this is not sufficient.Alternatively, M ATGRAPH may be initialized with an explicit argument spec-ifying the number of“slots”(place holders for graphs)like this:graph_init(20000)If you ever wish to delete all of the hidden data structures (and thereby erasing all graphs held therein),use the function graph_destroy.See also2the free_all,num_available,and max_available functions.2.3.Declaring graph objects and memory management. Before working with graphs,it is necessary to declare vari-able(s)to be of type graph.This runs against MATLAB’s philosophy that variables do not need to be declared,but is necessary for the sake of efficiency.To declare a variable,say g,to be of type graph,we give the following command:g=graph;It is helpful to read this as“let g be a graph.”This is the only circumstance in which a graph object may appear to the left of an equal sign.Behind the scenes,one of the“slots”allocated for graphs (by graph_init)is set aside for the graph g.Every time a graph variable is declared,one these slots is taken to hold the data for the graph.If a graph variable is no longer needed,then its slot can be released like this:free(g)If,inadvertently,a graph variable is cleared from MATLAB’s workspace,there is no convenient way to free the slot it occu-pied.Freeing a graph’s slot is not generally necessary when working at MATLAB’s command prompt.Graphs can be modified repeatedly and one need not declare more graph vari-ables than the number of graphs one is currently considering.However,releasing the slot held by a graph is vital in.m files.It is often useful for a function to declare a graph vari-able temporarily.Every graph that is created using the g=graph constructor must be released by a matching call to free(g).Otherwise,each time the function is invoked, another slot in M ATGRAPH’s hidden data structure is con-sumed until no slots remain available.To make a copy of a graph,we must not use the statement h=g.Rather,use copy(h,g).2.4.Basic graph operations.The statement g=graph createsa new graph with no vertices or edges.It is now possible to add and to delete vertices and edges using the resize,add,and delete functions.For each of these,the graph to be modified is thefirst argument(see the discussion of basic principles in §2.1).•resize(g,n)changes the number of vertices in g tothe value held in n.If n is greater than the numberof vertices in g,then additional,isolated vertices areadded.On the other hand,if n is less than the numberof vertices in g,then the highest numbered verticesare deleted leaving a graph with n vertices.For ex-ample,if g has10vertices and we invoke the com-mand resize(g,7),then vertices8,9,and10aredeleted(and all edges incident on these vertices arealso deleted).•add(g,u,v)adds an edge between u and v to thegraph.If either of these values is nonpositive,or ifthey are equal,nothing happens.If either u or v isgreater than the number of vertices currently in g,thegraph is expanded to have max{u,v}vertices.Another way to use add is like this:add(g,elist) where elist is a k×2array of positive integers.Eachrow of elist is considered an edge,and all of theseedges are added to the graph.If any end point of anyedge is larger than the number of vertices currently inthe graph,the graph is resized to accommodate.The automatic resizing has the potential side effect of adding isolated vertices.For example,if g has5vertices,and we then give the command add(g,3,7)the graph is resized to have7vertices.Vertex6isadded as an isolated vertex.MATGRAPH3Remember:The vertex set of all graphs in M AT-GRAPH are always of the form{1,2,...,n}wheren≥0.•delete is used to delete vertices or edges from agraph.–delete(g,v)deletes the vertex v from thegraph.(If v is not a vertex of the graph,thereis no effect.)All vertices with number greater than v have theirvalues decreased by1.For example,suppose gis a path graph with edges1∼2∼3∼4∼5.When we give the command delete(g,3)ver-tex3is deleted from the graph,and vertices4and5get renamed3and4,respectively.Thus,af-ter delete(g,3)the vertex set of g is{1,2,3,4}and the only edges are1∼2and3∼4.–delete(g,vlist)deletes an entire set of ver-tices.In this form,vlist is a k×1array of pos-itive integers.All vertices in vlist are deletedfrom the graph,and then vertices are renamed sothe vertex set remains of the form{1,2,...,n}.For example,if g is a cycle on5verticeswith edges1∼2∼3∼4∼5∼1,thendelete(g,[2;3])deletes vertices2and3fromthe graph(leaving edges4∼5∼1)and thenrenumbers vertices4and5with the new names2and3,so thefinal result is the path2∼3∼1.–delete(g,u,v)deletes the edge between u andv from the graph.If this edge is not present in thegraph,nothing happens.–delete(g,elist)deletes a list of edges fromthe graph.The variable elist must be a k×2array of positive integers.Point to notice:delete(g,[3;4])deletes vertices 3and4from the graph(second argument is a columnvector)whereas delete(g,[3,4])deletes the edge3∼4from the graph(second argument is a k×2ar-ray where k happens to equal1).See also the clear_edges function that deletes all edges from a graph.See also set_matrix(described in§2.8).See also contract.2.5.Standard graphs.M ATGRAPH provides several func-tions for forming standard graphs.One of the more versatile is the complete function for creating complete graphs,complete bipartite graphs,and complete multipartite graphs:•complete(g)adds all possible edges to g withoutchanging its vertex set.•complete(g,n)sets g to be the complete graph K n.•complete(g,n,m)sets g to be the complete bipartitegraph K n,m.•complete(g,list)sets g to be the complete mul-tipartite graph K(a1,a2,...,a t)where the indices arethe entries in list.Other general graph builders include path,cycle,grid, wheel,cube,circulant,and paley.Specific graphs can be formed using these:bucky,dodecahedron,icosahedron, octahedron,and petersen.Various random graphs can be built using these functions:random,sprandom, random_bipartite,and random_regular.2.6.Graph operations.M ATGRAPH provides a variety of operations to form new graphs from old.For example, line_graph(h,g)sets h to be the line graph3of g.Other operations include cartesian,complement,mycielski, induce,intersect,union,and trim.Breadth-first and depth-first spanning trees can be found us-ing bfstree and dfstree.See also nsptrees.2.7.Graph inspectors.The functions nv(g)and ne(g)give the number of vertices and edges of g.These two values are returned by size(g)in a1×2array.There are two ways to see if an edge is present in a graph g.The command has(g,u,v)returns1(for true)if the edge between u and v is present in g,and0otherwise.Alternatively, the same result is produced by g(u,v).The neighborhood of a vertex is returned by the command neighbors(g,v);the result is a list(one-dimensional array) of the vertices adjacent to v.The same result is returned by g(v).The degree of a vertex is given by deg(g,v).With only a single argument,deg(g)returns the degree sequence of the graph.find_path(g,u,v)finds a shortest path from u to v(re-turned as a list of vertices on the path);if no such path exists, an empty array is returned.isconnected(g)returns1(true)if g is connected and0 (false)otherwise.The components of a graph can be found using components(g).This returns a partition object(see§5)each of whose blocks is the vertex set of a component of g.The distance between vertices can be found with dist(g,u,v).The form dist(g,u)returns an array giving the distances from u to all the vertices in the graph.Calling dist(g)returns a square matrix giving the distances between all pairs of vertices.See diam.2.8.Graph–matrix conversions.The adjacency matrix of a graph is returned by matrix(g).This returns a square log-ical matrix.To use this matrix arithmetically,convert it to class double;for example,the following command returns the eigenvalues of(the adjacency matrix of)a graph:eig(double(matrix(g)))Conversely,given a square,symmetric,zero-one,zero-diagonal matrix A,we can set g to have this matrix as its adja-cency matrix like this:set_matrix(g,A).See also spy,laplacian,and incidence_matrix.4ED SCHEINERMAN2.9.Graph invariants and partitions.In addition to basic information functions described in§2.7,M ATGRAPH can cal-culate other invariants and features of graphs of interest to graph theorists.These include alpha(independence number), omega(clique number),and dom(domination number).(All three of these use the integer programming facilities in MAT-LAB’s Optimization Toolbox.)See also diam.The bipartition function determines whether a graph is bipartite;if it is,it returns the bipartition as a partition object(see§5).Otherwise(the graph is not bipartite) bipartition returns an empty partition.A graph coloring algorithm is available in the color func-tion.This returns a partition of the vertex set of a graph into independent sets by a greedy coloring algorithm(step through the vertices in decreasing degree order and give thefirst avail-able color to each vertex in turn).Alas,this generally does not find a coloring withχ(G)colors.The chromatic polynomial of a graph can be found for small graphs.For example:>>g=graph;>>cycle(g,5)>>chromatic_poly(g)ans=1-510-1040shows that the chromatic polynomial of C5isx5−5x4+10x3−10x2+4x.2.10.Input-output.M ATGRAPH can read and write graphs infiles on the user’s hard disk.Suppose the user wishes to build a graph using some other software(such as a C program written by the user)and then read that graph into M ATGRAPH.To do this,the data should be saved in afile as a list of edges.Each line of thefile should contain exactly two integers separated by white space.These integers should range from1to the number of vertices in the graph.Let’s say that this data is saved in afile named mygraph.The MATLAB command load mygraph reads thefile mygraph and saves the contents of thatfile in a variable that is also named mygraph.(MATLAB’s current working direc-tory must be the same as the directory that contains thefile mygraph.)The variable mygraph is an m×2array of edges.This can be converted into a graph like this:g=graph(mygraph)or if the graph g already exists,like this:resize(g,0)add(g,mygraph)(The resize(g,0)clears all data from g.)M ATGRAPH also provides its own save and load com-mands.•save(g,filename)saves the graph g to the user’shard drive in afile named in filename.(For example,save(g,’mygraph’).)This saves all the informationabout the graph and not just a list of edges.file named in filename must be one created by M AT-GRAPH’s save command and not just a list of edges.M ATGRAPH provides a function named sgf which stands for s imple g raph f ormat.This function converts graphs to and from a2-column matrix whose rows have the following mean-ings:•Thefirst row is[n m]where n is the number of verticesand m is the number of edges in the graph.•The next m rows give the edges of the graph;each rowis of the form[u v]where1≤u=v≤n.•Optionally,an additional n rows give the locations ofthe vertices.Row number m+1+i is[x i y i]and spec-ifies the coordinates of vertex i.Matrices of this form are easy to read or to write on disk,and this format is easy for other programs to produce.In addition,it is possible to create.mfiles for saving graphs to be used by other programs.For example,M ATGRAPH’s dot command writes graphs to disk in a format that can be processed by GraphViz’s dot program.See also graffle and nauty.2.11.Handling large graphs.Behind the scenes,graphs in M ATGRAPH are saved as square matrices.A graph with,say, ten thousand vertices would occupy an array with100million entries.MATLAB provides the ability to handle matrices large matrices with few nonzero entries efficiently.This ability is embedded into M ATGRAPH.Small graphs are best handled using full storage.By de-fault,a graph created by g=graph uses full storage.It is easy,however,to convert a graph to use sparse storage.•sparse(g)converts a graph’s storage method to besparse.This is useful for extremely large graphs withrelatively few edges(i.e.,small average degree).•full(g)converts a graph’s storage to full mode.Thisis the preferred method for small graphs and graphswith many edges.One can check the type of storage in use with the issparse and isfull functions.The graph constructor g=graph takes an optional argu-ment;one can write g=graph(n)where n is a nonnegative integer.This creates a new graph with n vertices.If n is small, full storage is used for g.If n is large,sparse storage is auto-matically provided.How large is“large”?See set_large. bels.Naming vertices as consecutive integers from 1to n can be inconvenient.M ATGRAPH provides a means to assign text labels to vertices.The command label can be used to assign such labels to vertices:label(g,v,string) assigns the characters in string to be a label for vertex v.If a vertex of a graph is deleted,all higher numbered vertices are renumbered,but their labels are retained.The command get_label is used to learn the label of an individual vertex orMATGRAPH52.13.Visualization.It is often useful to be able to see pic-tures of graphs.M ATGRAPH provides a basic means to do this.One may associate an embedding with a graph;this is a mapping from the vertex set to points in the plane.The command draw draws a picture of the graph in the plane by placing each vertex at its x,y-coordinates and joining adjacent vertices by line segments.See also ndraw and ldraw. Note that draw simply draws the graph in the currentfigure window without erasing the contents of thatfigure;to see only the graph,first give the MATLAB command clf.See also the functions ndraw and cdraw.When draw is invoked for graphs without embeddings, a default,circular embedding is automatically constructed. Some graph building operations attach an embedding to the graphs they form;for example,petersen(g)sets g to be the Petersen graph with vertices located at classic coordinates.It is possible to set a graph’s embedding to coordinates of your choosing with the embed command.If g has n vertices and xy is an n×2matrix of real numbers,then embed(g,xy) sets the coordinates of the vertices to the corresponding rows of xy.The command randxy(g)sets the coordinates of the vertices to random locations.To learn the current embedding of a graph,use getxy(g). To erase a graph’s embedding,use rmxy(g).See also hasxy.The best M ATGRAPH method to generate an embedding is distxy.This function uses MATLAB’s Optimization Tool-box.It works reasonably well on small graphs.It attempts to place vertices in the plane so that the Euclidean distance matches their graph-theoretic distance,but the penalty is less-ened the further apart the nodes.We also provide mdsxy which creates an embedding based on multidimensional scaling.It’s fast,but produces mediocre results.Readers are warmly encouraged to submit other embedding algorithms for incorporation into M ATGRAPH.3.D OCUMENTATIONThis introduction to M ATGRAPH does not list every func-tion available to the user.However,all functions(in.m files)are documented in the accompanying web pages.These web pages are housed in the html subdirectory of the main matgraph folder.Double clicking on thefile index.html opens the main documentation page in a web browser.From here,all the.mfiles can be found including descriptions,cross references,and source code.This includes the supporting classes partition and permutation.In addition,the user may get help on any M ATGRAPH com-mand with MATLAB’s usual help command.Some command names are overloaded.For example,the name delete is both a built-in MATLAB command and a M ATGRAPH function. Type help graph/delete to access the M ATGRAPH version.For a list of all methods available for graph objects,type methods graph.See also Matgraph By Example in the doc directory.The web pages in the html directory were generated by by the m2html package created by Guillaume Flandin;this utility can be found on the MathWorks’web site.4.T HE P ERMUTATION C LASSIncluded in this toolbox is a class called permutation. These objects represent permutations of the integers {1,2,...,n}.Unlike graph s,these object behave accord-ing to the usual MATLAB conventions and do not need to be specially declared.permutation objects are used by M AT-GRAPH’s renumber command.The standard way to build a permutation p is to specify its action with a vector of the form[a1,a2,...,a n]where a i=p(i). For example:>>p=permutation([213564])(1,2)(3)(4,5,6)This assigns to p a permutation in which p(1)=2,p(2)=1, p(3)=3,p(4)=5,p(5)=6,and p(6)=4.Note that p is displayed on the console using the standard disjoint cycle no-tation.The basic operations of applying a permutation to an ele-ment and composition of permutations are position of permutations is denoted by multipli-cation,*.Repeated composition can be achieved using theˆoperator:pˆ3is equivalent to p*p*p.The power may be zero or negative.Equality and inequality of permutations can be checked with==and˜=,respectively.Here are the functions defined for the class permutation. Their.mfiles are found in the@permutation folder.•array:convert a permutation to an array.The syntaxis array(p).This returns a1×n array whose i th en-try if p(i).For example,if p=(1,2)(3)(4,5,6),thenarray(p)returns the array[2,1,3,5,6,4].•cycles:determine the cycle structure of a permuta-tion.The syntax is cycles(p).This returns a cellarray.Each member of the cell array contains theelements(in order)of a cycle of p.For example,ifp=(1,2)(3)(4,5,6),then c=cycles(p)sets c{1}to[1,2],c{2}to[3],and c{3}to[4,5,6].6ED SCHEINERMAN•length :number of elements permuted.The syntax is length(p).For example,if p =(1,2)(3)(4,5,6),then length(p)is 6.•matrix :return a permutation matrix that represents the permutation.The syntax is matrix(p).For ex-ample,if p =(1,2)(3)(4,5,6),then matrix(p)gives this:010000100000001000000001000100000010•permutation :class constructor.This can be called two ways.If n is a positive integer,permutation(n)returns the identity permutation on {1,2,...,n }.If x is an array containing the elements 1through n ,then permutation(x)creates the permutation specified by those elements.For example,if x is [213564],then permutation(x)gives the permutation (1,2)(3)(4,5,6).•random :shuffle a permutation.The syntax is random(p).This returns a permutation on the same elements as p but in a random order.Typically,to gen-erate a random permutation on n elements,one would type this:random(permutation(n)).•sign :sign (parity)of a permutation.The syntax is sign(p).This returns 1is p is an even permutation and −1is p is an odd permutation.•size :give the number of elements and number of cy-cles in a permutation.The syntax is size(p).This returns a two-element array.The first element is the number of objects permuted by the permutation and the second element is the number of cycles in the disjoint-cycle representation of p .MATLAB uses this when reporting on per-mutation variables in the workspace.The permutation (1,2)(3)(4,5,6)is described as a <6x3permutation>.The 6refers to the fact that this is a permutation of the set {1,2,...,6}and the 3refers to the fact that this permutation has 3cycles.5.T HE P ARTITION C LASSThe partition class represents partitions of sets of the form {1,2,...,n }.A partition can be created with the com-mand p=partition(n).This creates a partition in which all parts have size 1;that is,the partition {1},{2},...,{n } .A partition can also be created from a cell array.Each cell in the array should list the elements of a block;the integers 1through n should appear exactly once in each member of the cell array.For example,if we typec ={[124],[356],[7:10]};p =partition(c)Then p is the partition {1,2,4},{3,5,6},{7,8,9,10}and MATLAB types this:{{1,2,4}{3,5,6}{7,8,9,10}}If p is a partition and k is an integer,the expression p(k)returns the elements in the same part as k .For the partition presented above,p(2)would return the array [124].For integers j and k ,the expression p(j,k)returns true if j and k are in the same part of p and false otherwise.The meet and join of two partitions is computed using p*q and p+q ,respectively.Equality and inequality can be checked with ==and ˜=.Partitions can be converted into cell arrays with the parts function.Here is a list of the various functions defined for the partition class;these can be found in the @partition folder.•merge :combine two parts.The syntax is merge(p,j,k).This returns a new partition in whichthe parts containing j and k have been merged into a single part.•np :number of parts.The syntax is np(p);the number of parts in the partition is returned.•nv :size of the ground set.The syntax is nv(p);the number of elements in the ground set of the partition is returned.•partition :constructor for this type.The simple syn-tax is partition(n)(where n is a positive integer).This builds a partition with ground set {1,2,...,n }in which there are n parts (all of size one).Alternatively,if c is a cell array,then partition(c)creates a partition based on the ar-rays in c .Each of c{1},c{2},and so on,is a list of integers.Together,these lists should contain each of the integers in [n ]exactly once.•parts :get the parts of the partition.The syntax is parts(p).This returns a cell array.Each cell con-tains a list (vector)of positive integers in one of the parts of p .•size :report the number of elements in the ground set and the number of parts.The syntax is size(p).This returns a 1×2array [n m]where n is the size of the ground set and m is the number of blocks.This is used by MATLAB when it reports the vari-ables in a workspace.A partition is reported like this:<10x3partition>.This means the partition’s ground set is [10]and there are three parts in the par-tition.MATGRAPH7 6.U NDER THE H OOD(S TUFF Y OU D ON’T N EED TO K NOW)All data about graphs are held in a hidden global data struc-ture named GRAPH_MAGIC.Objects of type graph are simply indices into this structure.This enable us to simulate call-by-reference semantics for graph objects;that is,MATLAB functions can modify graph arguments.It is possible to save the entire GRAPH_MAGIC structure into another variable;this would allow multiple“graph theory uni-verses”to coexist.It’s not clear this is needed.6.1.The GRAPH MAGIC structure.The global data struc-ture is named GRAPH_MAGIC.To access this structure directly, use the following line in your.mfiles:global GRAPH_MAGICThe GRAPH_MAGIC structure contains the followingfields:•ngraphs:the number of“slots”available inthis structure(equal to the size of the arraysGRAPH_MAGIC.graphs and GRAPH_MAGIC.in_use).•graphs:this is a cell array containing the graphs.(See§6.1.1.)•in_use:an array that indicates which slots are taken.A1in position i of this array signals that slot i is taken;a0means the slot is available to hold a new graph.•Q:a structure implementing a double-ended queue.(See§6.1.2.)•large_size:a variable holding the cutoff between“large”and“small”graphs.If the graph construc-tor graph is fed a large argument,it creates a sparsegraph.6.1.1.Inside GRAPH MAGIC.graphs.The cell array GRAPH_MAGIC.graphs holds the graphs.Each cell in this array is a structure with twofields:array and xy.The array field holds the adjacency matrix of the graph(a zero-one, symmetric matrix).The xyfield holds the embedding for the graph;this is an n×2array of real values giving the coordi-nates of the vertices.6.1.2.The private double-ended queue.The Qfield of GRAPH_MAGIC is a double-ended queue available for use by graph algorithms(e.g.,bfstree).It is a structure that con-tains threefields:•array:a one-dimensional array that holds thestack/queue values.•first:an index pointing to thefirst(front most)ele-ment of the queue.•last:an index pointing to the last(back most)ele-ment of the queue.There is a small suite of tools for working with the queue in the directory@graph/private.These are visible to functions inside the@graph directory,but not generally available.Here they are(in alphabetical order):•q_capacity:gives the maximum capacity of thequeue.•q_get:returns a list of the elements in the queue(thatis,array(first:last)).•q_init:called with one argument,this initializes thequeue with a given capacity.•q_pop_back:pops off(and returns)the last elementof the queue.This is a stack-like operation.•q_pop_front:pops off(and returns)the front mostelement in the queue.This is a queue-like operation.•q_push:called with one argument,this adds an ele-ment to the back of the queue.•q_size:returns the number of elements in the queue.6.2.The graph type.The graph type is simply a“wrap-per”for an integer;that integer is an index into the GRAPH_MAGIC.graphs array.A graph object contains just one field,idx,which holds that integer.In many graph functions(in the@graph directory)we see the following:GRAPH_MAGIC.graphs{g.idx}.arrayThis is how we refer to the adjacency matrix of the graph g.7.F UTURE P ROJECTSThere are many additions I would like for this project.Here are few:•Planarity testing and embedding.I would like anis_planar method to test if a graph is planar and agood planar_embed method forfinding a crossing-free embedding.•The distxy layout routine works reasonably well,butis hardly fast.It also relies on the Optimization Tool-box.I’d like a better layout engine.•A GUI for creating and editing graphs.I’d like to see this invoked with a command such as gui(g)or graph_edit(g).•We need.mfiles for connectivity,edge connectiv-ity,maximum matching(in general graphs),approx-imate isomorphism,better heuristic coloring algo-rithms,girth,and so forth.D EPARTMENT OF A PPLIED M ATHEMATICS AND S TATISTICS,T HE J OHNS H OPKINS U NIVERSITY,B ALTIMORE,M ARYLAND21218-2682USA E-mail address:ers@。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A MATLAB Toolbox and its Web based Variantfor Fuzzy Cluster AnalysisTamas Kenesei,Balazs Balasko,and Janos AbonyiUniversity of Pannonia,Department of Process Engineering,P.O.Box158,H-8201Veszprem,Hungary,abonyij@fmt.uni-pannon.huwww.fmt.vein.hu/softcompAbstract.Nowadays due to the yearly multiplying data comes always the need for useful methods,algorithms,that make the processing of these data easier.For the solution of this problem data mining tools come into existence,to which clustering algorithms belong.The purpose of this paper is to propose a continuously extensible,standard tool,which is useful for any MATLAB user for one’s aim.The toolbox contains crisp and fuzzy clustering algo-rithms,validity indexes and linear and nonlinear visualization methods for high-dimensional data.The web-based prototype version of the toolbox already has been developed.It means that users do not need to have MATLAB software and programming knowledge,but only a web browser and they can load their own data into the web server and download the results because the program codes run on Matlab Web Server with a developed data mining portal, which is found in the following url:www.pe.vein.hu/datamine.The portal is in test phase,with limited services.The Fuzzy Clustering and Data Analysis Toolbox with User’s Guide is available at /fileexchange.1IntroductionIn this paper we propose a MATLAB toolbox for data analysis based on clustering and its application via Internet.Data analysis and data mining methods are more and more important because lots of data is being collected and warehoused in re-cent years since these data definitely have the potential to provide information.The definition of data mining is extraction of interesting(non-trivial,implicit,previ-ously unknown and potentially useful)information or patterns from data in large databases.The tasks of data mining can be very different.We can group the data mining tools and processing algorithms in the following primary data mining meth-ods:Classification,Regression,Clustering,Summarization,Dependency Modeling, Change and Deviation Detection.Many MATLAB toolboxes have been developed in several researchfields in recent years.A MATLAB toolbox is presented for Self Organizing Map in[1],an-other one is for Bayes Net in[2]and another is for dimensional analysis in[3].The so called KERNEL toolbox can be used for knowledge extraction and refinement based on neural learning[4].Robert Babuska developed a toolbox for fuzzy model identification[5].These toolboxes are available in the Internet but none of them can be used without MATLAB.The web based variant of the proposed toolbox enablesMATLAB independent usage and it does not make demand on the client computers because it runs on the web server.The proposed toolbox contains clustering methods and visualization techniques based on clustering.A cluster is a collection of data objects that are similar to one another within the same cluster and dissimilar to the objects in other clusters.Clus-ter analysis is grouping a set of data objects into clusters without any predefined classes so clustering is unsupervised classification.Clustering algorithms can be partitioning,hierarchy,density-based,grid-based or model-based methods.Objective function based fuzzy clustering algorithms have been used extensively for various problems such as pattern recognition[6],data analysis[7],image pro-cessing[8]and fuzzy modelling[9].Fuzzy clustering algorithms partition the data set into(partially)overlapping groups in a way that clusters describe an underlying structure within the data.To obtain a good result,a number of issues are of impor-tance.These concern the shape and the volume of the clusters,the initialization of the algorithm,the distribution of the data patterns and the number of clusters.This toolbox contains objective function based partitioning algorithms:they construct various partitions and then evaluate them by some criterion to minimize an objective function that is based on the distance between the cluster prototypes and the data points.The toolbox contains the k-means,k-medoid(crisp),fuzzy c-means, Gustafson-Kessel and Gath-Geva(fuzzy)clustering methods and other important tools such as methods for determining the number of clusters and for visualization of the clustering results.The toolbox contains method for visualization of high-dimensional data.Visual-ization is a technique that projects data in higher dimensions to data in lower dimen-sions while trying to preserve the distances between all points.It can be very use-ful because it can(i)identify meaningful underlying dimensions that could explain similarities or dissimilarities in the data,(ii)detect underlying structure and(iii)re-duction the data dimension and reveal relationships.Nonlinear mapping methods are often based on the results of a clustering algorithm so the clustering and visual-ization algorithms have a strong connection.The so-called online data mining has greater and greater importance in our in-formation society.For this purpose we developed a tool which enables us to use data mining methods via the internet,where the application is running in the server side not in the client computers,so the resources of client computers are free for other applications.For this purpose the client has to have only a web browser.The paper is organized as follows.Section2presents the theoretical base of the toolbox and Section3gives application examples to prove the applicability of this Toolbox.Section4presents an application by which it can be used via internet without downloading and installing the toolbox.Section5contains the conclusions.2Fuzzy Clustering and Data Analysis ToolboxThe objective of cluster analysis is the classification of objects according to simi-larities among them,and organizing of data into groups.Clustering techniques are among the unsupervised methods,they do not use prior class identifiers.The main potential of clustering is to detect the underlying structure in data,not only for clas-sification and pattern recognition,but for model reduction and optimization.Clus-tering techniques can be applied to data that is quantitative(numerical),qualitative (categoric),or a mixture of both.In this paper,the clustering of quantitative data is considered.Since clusters can formally be seen as subsets of the data set,one possible clas-sification of clustering methods can be according to whether the subsets are fuzzy or crisp(hard).Hard clustering methods are based on classical set theory,and require that an object either does or does not belong to a cluster.Fuzzy clustering methods allow objects to belong to several clusters simultaneously,with different degrees of membership.In many real situations,fuzzy clustering is more natural than hard clus-tering,as objects on the boundaries between several classes are not forced to fully belong to one of the classes,but rather are assigned membership degrees between0 and1indicating their partial memberships.Different classifications can be related to the algorithmic approach of the clus-tering techniques.In this work we have worked out a toolbox for the partitioning methods,especially for hard and fuzzy partition methods.In the following part of this section we briefly discuss the applied and well-known clustering methods,validity indices and algorithms for visualization of clus-ters.As generic notation,c will denote the number of clusters,N the number of data points and n the dimension of each data point.2.1Clustering AlgorithmsThe k-means and k-medoid algorithms are hard partitioning methods and they are simple and popular,though them results are not always reliable and these algorithms have numerical problems as well.The k-means and k-medoid algorithms allocates each data point to one of c clusters to minimize the within-cluster sum of squares:c ∑i=1∑k∈A i||x k−v i||2(1)where A i is a set of objects(data points)in the i-th cluster and v i is the mean for that points over cluster i.In k-means clustering the cluster prototype is a point.In k-medoid clustering the cluster centers are the nearest objects to the mean of data in one clusterThe fuzzy c-means algorithm(FCM)can be seen as the fuzzified version of the k-means algorithm and is based on the minimization of an objective function called c-means functional:J(X;U,V)=c∑i=1N∑k=1(µik)m x k−v i 2A(2)where V=[v1,v2,...,v c],v i∈R n is a vector of cluster prototypes(centers),whichhave to be determined,D2ikA = x k−v i 2A=(x k−v i)T A(x k−v i)is a squared inner-product distance norm,and the N×c matrix U=[µik]represents the fuzzy partitions, whereµik denotes the membership degree that the i th data point belongs to the k th cluster.Its conditions are given by:µi j∈[0,1],∀i,k,c∑k=1µik=1,∀i,0<N∑i=1µik<N,∀k.(3)FCM algorithm canfind only clusters with the same shape and size because the distance norm A is not adaptive and it is often Euclidean norm(spherical clusters). The solution can be given by Lagrange multiplier method.Gustafson-Kessel algorithm(GK)is the extended version of the standard fuzzy c-means algorithm by employing an adaptive distance norm,in order to detect clus-ters of different geometrical shapes in one data set.Each cluster has its own norm-inducing matrix A i.The objective function cannot be directly minimized with re-spect to A i,since it is linear in A i.This means that J can be made as small as desired by simply making A i less positive definite.To obtain a feasible solution,A i must be constrained in some way.The usual way of accomplishing this is to constrain the determinant of A i.Allowing the matrix A i to vary with its determinantfixed corre-sponds to optimizing the cluster’s shape while its volume remains constant so GK algorithm canfind clusters with different shape but with the same size[10].Gath-Geva algorithm(GG)is based on the fuzzy maximum likelihood esti-mation and it is able to detect clusters of varying shapes,sizes and densities.The cluster covariance matrix is used in conjunction with an”exponential”distance,and the clusters are not constrained in volume.However,this algorithm is less robust in the sense that it needs a good initialization,since due to the exponential distance norm,it converges to a near local optimum[11].2.2ValidationCluster validity refers to the problem whether a given fuzzy partitionfits to the data all.The clustering algorithm always tries tofind the bestfit for afixed number of clusters and the parameterized cluster shapes.However this does not mean that even the bestfit is meaningful at all.Either the number of clusters might be wrong or the cluster shapes might not correspond to the groups in the data,if the data can be grouped in a meaningful way at all.Two main approaches to determining the appropriate number of clusters in data can be distinguished:•Starting with a sufficiently large number of clusters,and successively reducing this number by merging clusters that are similar(compatible)with respect to some predefined criteria.This approach is called compatible cluster merging[12].•Clustering data for different values of c,and using validity measures to assess the goodness of the obtained partitions.Different scalar validity measures have been proposed in the literature,none of them is perfect by oneself,therefore we used several indexes in our Toolbox.De-tailed description about the applied indexes can be found in the literature so we just make mention of them in this section:Partition Coefficient(PC),Classifica-tion Entropy(CE),Partition Index(SC),Separation Index(S),Xie and Beni’s Index (XB),Dunn’s Index(DI)and Alternative Dunn Index(ADI).Note,that the only difference of SC,S and XB is the approach of the separation of clusters.In the case of overlapped clusters the values of DI and ADI are not really reliable because of re-partitioning the results with the hard partition method.2.3VisualizationThe clustering-based data mining tools are getting popular,since they are able to ”learn”the mapping of functions and systems or explore structures and classes in the data.There are often high-dimensional data in practice and it can be practical if we can see the results of the clustering(e.g.for checking the the results orfinding out the underlying structure of the data).For this purpose several methods can be used.The Principal Component Analysis maps the data points into a lower dimen-sional space,which is useful in the analysis and visualization of the correlated high-dimensional data.This mapping is based on the eigenvector-eigenvalues decompo-sition of F covariance matrix and uses only thefirst few nonzero eigenvalues and the corresponding eigenvectors.[1]The Sammon mapping method can be used for the visualization of the clus-tering results,which preserves interpattern distances.This mapping methodfinds N points in a q-dimensional data space,where the original data are from a higher n-dimensional space.The interpoint distances measured in the n-dimensional space approximate the corresponding interpoint distances in the q-dimensional space.This is achieved by minimizing an error criterion called Sammon’s stress using e.g. gradient-descent method.[13].To avoid the high computational of Sammon mapping,a modified Sammon map-ping algorithm is used in this work.The fuzzy Sammon mapping method uses the basic properties of fuzzy clustering algorithms where only the distance between the data points and the cluster centers are considered to be important[9].The modified algorithm takes into account only N×c distances,where c represents the number of clusters,weighted by the membership values.This means,in the projected two dimensional space every cluster is represented by a single point,independently to the form of the original cluster prototype.3Application of the Toolbox3.1Comparing the Clustering ResultsUsing the validity measures mentioned in Section 2.2the partitioning methods can be easily compared.For illustration,a synthetic data set was used shown in Fig.1,Fig.2so the index-values are better demarcated at each type of clustering.These validity measures are collected in Table 1.First of all it must be mentioned,that all these algorithms use random initializa-tion,so different runs issue in different partition results,i.e.values of the validation measures.On the other hand the results hardly depend from the structure of the data,and no validity index is perfect by itself for a clustering problem.Several experiment and evaluation are needed that are not the proposition of this work.PCCE SC S XB DI ADI K-means 1NaN 0.0950.00013987.40.01390.0004K-medoid 1NaN 0.24340.0003Inf 0.00370.0036FCM 0.82820.34700.92210.000819.66630.01750.0119GK0.83150.32750.86970.000932.12430.00810.0104GG 0.98340.02852.24510.0020 2.59830.01600.0084Table 1.The numerical values of validity measuresx1x 2x1x 2Fig.1.Result of k-means and k-medoid algorithms by the synthetic overlapping data with normalization.Fig.1shows that hard clustering methods also can find a good solution for the clustering problem,when it is compared with the figures of fuzzy clustering algo-rithms.On the contrary in Fig.1one can see a typical example for the initialization problem of hard clustering.This caused the differences between the validity index values in Table 1,e.g.the Xie and Beni’s index is infinity (in ”normal case”the k-medoid returns with almost the same results as K-means).The only differencex 2x1x 2x1x 2x1Fig.2.Result of FCM,GK and GG algorithms by the synthetic overlapping data with nor-malization.between the results of FCM and GK Fig.2stands in the shape of the clusters,while the Gustafson-Kessel algorithm can find the elongated clusters better.Fig.2shows that the Gath–Geva algorithm returned with a result of three subspaces.As one can see in Table 1,PC and CE are not applicable for K-means and K-medoid,while they are hard clustering methods.But that is the reason for the best results in S,DI (and ADI),which are useful to validate crisp and well separated clusters.On the score of the values of the two ”most popular and used”indexes for fuzzy clustering (Partition Coefficient and Xie and Beni’s Index)the Gath-Geva clustering has the very best results for this data set.3.2Visualization ResultsIn order to examine the performance of the proposed clustering methods a well-known multidimensional classification benchmark problem is presented in this sec-tion:wine data.This data set comes from the UCI Repository of Machine Learning Databases.Cause of the too many data points there is no use to show the partition matrixes in tables,so the results of the n -dimensional clustering was projected into 2-dimension,and the 2-D results were plotted.Considering that projected figures are only approximations of the real partitioning results,the difference between the orig-inal and the projected partition matrix is also represented,and on the other hand one can observe the difference between the PCA,Sammon’s mapping and the Modified Sammon Mapping too,when these values are comprehended.The detailed projection methods are based the results of a clustering ing the proposed toolbox the best clustering algorithm can be chosen easily for this purpose.In the case of the wine data set the fuzzy c-means clustering has the best stable results correspond to the misclassified objects,so its resulting figures are shown in the following.The Wine data contains the chemical analysis of 178wines grown in the same region in Italy but derived from three different cultivars (marked with ’.’,’x’and ’+’).The problem is to distinguish the three different types based on 13continuous attributes derived from chemical analysis.y1y 2y1y2y 2y1Fig.3.Result of PCA,Sammon’s Mapping and Fuzzy Sammon Mapping projection by the Wine data set.P = U −U ∗∑N k =1µ2k ∑N k =1µ2∗k E PCA 0.12950.50330.74240.1301Sammon 0.08740.50330.65740.0576FuzSam 0.03650.50330.51700.0991Table 2.Relation-indexes on Wine data set.As Table 2shows,Fuzzy Sammon Mapping has much better projection results by the value of P ,which measures the difference between the original and projected membership matrices,than Principal component Analysis,and it is computationally cheaper than the original Sammon Mapping.So during the evaluation of the parti-tion thefigures created with this projection method were considered.We calculated the original Sammon’s stress for all the three techniques to be able to compare them. 4Web-based Version of The ToolboxThis section presents a solution for using the proposed toolbox without any down-loading and installation.It is an user friendly way via the Internet becouse the users do not need to have MATLAB and do not need to be competent in programming languages.Thefinal goal of data mining is the extraction useful information and knowledge from data.Knowledge is the ability of people to learn from information and react faster and better than their competitors.Devices and methods of data acquisition, management,analyzing and forwarding to the right places can be prime importance in nowadays intensive market competition.Corporations have to form their large databases,data warehouses and exter-nal sources to store knowledge.In the following we want to show the integration methodology of the data sources and the soft computing tools.We store data in databases or in a data warehouses(DW),where programs with well designed GUI support fast andflexible working.If we want to work with the stored data,we need the above front-end applications to connect the DW,so clent computers needs these installed applications.The basic idea is to use a web browser to analyze data of a complex system. Clients need only a web browser;the workflow application supplies the processing methods and the connection to the stored data.So the work of client programs can be fullfilled by developing web based work-flow applications,which can be maintained easily with system administrators,and provides the simplicity of installed client programs.Our main goal is to provide a web–based user friendly interface to our toolbox. While Matlab Web Server is available in our Department,it is obvious to use the advantages of this technology.To develop dinamic user–friendly sites we use PHP1, to store user data we use MySQL server.Summarizing the technologies,PHP create dinamic sites,database store user settings and Matlab Web Server deals with data processing,so the following componets are needed to create a web based workflow system with MATLAB:•PHP interpreter(in CGI or in server modul format)•Web server(either Apache or IIS)•Database manager(MySQL)•Matlab Web Server•Web server1It’s free,and provides fast developmentFig.4.MATLAB Web Server ComponentsMatlab Web Server2is a complex system to online data processing.Figure4 shows how MATLAB operates over the Web.This structure is pieced together with the additional PHP applications,and the database storing.Using this structure there is no need to compile MATLAB algoritms with MAT-LAB–C compiler,which is a very handy feature,becouse the C compiler couldn’t be able to deal with structures,so it wasn’t able to use the resources of the Matlab programming language.Further benefits of this architecture is that there is no need to deep re-structuring of the implemented algorimts,only the in and output s have to be well determined and the core process method is in a basic Mfile.Matlab Web Server do the rest,if it is invoked by a special html form.After processing the data Matlab Web Server can return the results with using a templatefile.5ConclusionsTo meet the growing demands of systematizing the nascent data,aflexible,powerful tools are needed.The Fuzzy Clustering and Data Analysis Toolbox provides several approaches to cluster,classify and evaluate wether industrial or experimental data sets.The software for these operations has been developed with MATLAB,which is very powerful for matrix-based calculations.The Toolbox providesfive different 2types of clustering algorithms,which can be validated by seven validity measures. High-dimensional data sets can be also visualized with a2-dimension projection, hence the toolbox contains three different method for visualization.The web based version of this tool does not require to have MATLAB and the users’computers will be free for other applications because the program runs on the web server and the results can be downloaded from the server.AcknowledgementThe authors would like to acknowledge the support of the Cooperative Research Centre(VIKKK)(project2004-I)and Hungarian Research Found(OTKA T049534). Janos Abonyi is grateful for the support of the Bolyai Research Fellowship of the Hungarian Academy of Sciences.References1.Vesanto,J.,Himberg,J.,Alhoniemi,E.and Parhankangas,J.,Self-organizing map inmatlab:the som toolbox,Proceedings of MATLAB DSP Conference,Espo,Finland (1999)pp.35–40.2.K.Murphy,The bayes net toolbox for matlab,Computing Science and Statistics.3.Br¨u ckner,S.,The Dimensional Analysis Toolbox for Matlab,in:User’s Manual,Stuttgart,/.,2002.4.Castellano,G.,Castiello,C.and Fanelli,A.M.,KERNEL:A Matlab toolbox for Knowl-edge Extraction and Refinement by NEural Learning,2000.5.R.Babuska,Fuzzy modeling and identification toolbox for matlab,Delft University ofTechnology:Faculty of Information Technology and Systems.6.W.Pedrycz,Fuzzy clustering with a knowledge-based guidance,Pattern RecognitionLetters25(2004)pp.469–480.7.Szeto,L.K.,Liew,A.W.C.,Yan,H.and Tang,S.S.,Gene expression data clustering andvisualization based on a binary hierarchical clustering framework,Journal of Visual Lan-guages and Computing14(4)(2003)pp.341–362.8.M.Barni,R.Gualtieri,A new possibilistic clustering algorithm for line detection in realworld imagery,Pattern Recognition32(11)(1999)pp.1897–1909.9.Abonyi,J.,Babuska,R.and Szeifert,F.,Modified Gath-Geva fuzzy clustering for iden-tification of Takagi-Sugeno fuzzy models,IEEE Transactions on Systems,Man and Cy-bernetics,Part B-Cybernetics32(5)(2002)pp.612–621.10. D.Gustafson,W.Kessel,Fuzzy clustering with fuzzy covariance matrix,Proceedings ofthe IEEE CDC,San Diego(1979)pp.761–766.11.I.Gath,A.Geva,Unsupervised optimal fuzzy clustering,IEEE Transactions on PatternAnalysis and Machine Intelligence7(1989)pp.773–781.12.M.Setnes,Supervised fuzzy clustering for rule extraction,Proceedings of FUZZ-IEEE’99,Seoul,Korea,(1999)pp.1270–1274.13.J.J.Sammon,A nonlinear mapping for data structure analysis,IEEE Transactions onComputers18(1969)pp.401–409.。