-->

计算使用MATLAB能量(Calculating energy using MATLAB)

2019-07-18 23:54发布

能源,这是如下:

可以发现基于对MATLAB使用文档:

stats = graycoprops(glcm, properties)

例如,我输入这样的:

>> a = [1 2; 3 4]

a =

     1     2
     3     4

>> stats = graycoprops(a, {'energy'})

stats =

    Energy: 0.3000

如果我们想手动做到这一点,我们是怎么得到上面显示的能量值?

这是我没有得到明确的部分。

Answer 1:

如果我没有错:

ans=sum(a(:).^2)/sum(a(:)).^2


文章来源: Calculating energy using MATLAB