matlab怎么调出来的,如何调出MATLAB内部函数的源程序?

如何调出MATLAB内部函数的源程序?

MATLB的函数源程序都存放在MATLAB安装文件夹内的toolbox文件夹下,这些函数都是.m文件,可以用搜索文件的方法搜索函数名找到这个函数的.m文件。

也可以在MATLAB主界面内输入edit 函数名,用M-file Editor打开这个函数的源程序。

在命令窗口中输入

edit 函数名

函数名就是你要看的函数名字,这样就可以打开源文件的M文件.不过有的函数不允许编辑,也就没有办法查看了.

Statxture 源函数

% T=SATAXTURE(F,SCALE) computes six measures of texture from an

% image (region) F. Parameter SCALE is a 6-dim row vector whose

% elements multiply the 6 corresponding elements of T for scaling

% purpose. If SCALE is not provided it defaults to all 1s. The

% output T is 6-by-1 vector with the following elements:

% T(1) =Average gray level

% T(2) =Average contrast

% T(3) =Measure of uniformity

% T(4) =Third moment

% T(5) =Measure of uniformity

% T(6) =Entropy

if nargin == 1

scale(1:6) = 1;

else% Make sure it's a row vector.

scale = scale (:)';

end

% Obtain histogram and normalize it.

P = imhist(f);

P = p./numel(f);

L = length(p);

% Compute the three moments. We need the unnormalized ones

% from function statmoments. Thses are in vector mu.

[v,mu] = statmoments(p,3);

% Compute the six texture measures:

% Average gray level.

t(1) = mu(1);

% Standard deviation.

t(2) = mu(2).^0.5;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值