Sunday, August 28, 2016

MIUI:Call Records

配置通话录音

参考经验“小米通话自动录音设置”,但我的电话与经验所列步骤略有不同,这里简单记录。 我的电话配置路线,首先是首页Settings,再转至Call settings,后面的手动配置与经验相同。
Fig. 1

通话录音提取

我这里设置记录所有通话过程,任意一段通话结束后都有录音结束的提醒。提取一段录音的过程:找到Tools下的Recorder,依次按照Fig. 2从左至右顺序找到这段通话录音。
Fig. 2
Fig. 2最右图,按住这一段录音,大约2秒,直至出现Fig. 3最左侧图形,依照Fig. 3从左至右顺序以邮件附件形式将该段录音转发至各地。
Fig. 3
或使用小米云下载录音,见Fig. 4。
Fig. 4

Tuesday, August 23, 2016

Matlab: Gravity Model for Some Value

Gravity Center

某指数的空间重心可以由以下公式直接算出:
\[X = \frac{{\sum\limits_{i = 1}^n {{W_i}{X_i}} }}{{\sum\limits_{i = 1}^n {{W_i}} }}\] \[Y = \frac{{\sum\limits_{i = 1}^n {{W_i}{Y_i}} }}{{\sum\limits_{i = 1}^n {{W_i}} }}\]
式中:XY为重心的经度(横坐标)、纬度(纵坐标);W为某指数;n为参与计算的指数数量。

Movement Distance

重心转移距离可以由以下公式直接算出:
\[D = \sqrt {{{\left( {{X_{t1}} - {X_{t2}}} \right)}^2} + {{\left( {{Y_{t1}} - {Y_{t2}}} \right)}^2}} \]
式中:D为重心转移距离;t1、t2为前后两个时间。

References

[1] Yingbin He, Youqi Chen, Huajun Tang, et al.. Exploring spatial change and gravity center movement for ecosystem services value using a spatially explicit ecosystem services value index and gravity model[J]. Environmental Monitoring and Assessment, 2011, 175:563–571.
[2] Caiyao Xu, Lijie Pu, Ming Zhu, et all.. Ecological Security and Ecosystem Services in Response to Land Use Change in the Coastal Area of Jiangsu, China[J]. Sustainability, 2016, 8(8): 1~24.
[3] 孙东琪, 张京祥, 朱传耿等. 中国生态环境质量变化态势及其空间分异分析[J]. 地理学报, 2012, 67(12): 1599~1610.

Tuesday, August 16, 2016

Matlab: Nested Functions

What Are Nested Functions?

A nested function is a function that is completely contained within a parent function. Any function in a program file can include a nested function.
For example, this function named parent contains a nested function named nestedfx:
1
2
3
4
5
6
7
8
9
function parent
disp('This is the parent function')
nestedfx

   function nestedfx
      disp('This is the nested function')
   end

end
The primary difference between nested functions and other types of functions is that they can access and modify variables that are defined in their parent functions. As a result:
  1. Nested functions can use variables that are not explicitly passed as input arguments.
  2. In a parent function, you can create a handle to a nested function that contains the data necessary to run the nested function.

References

Monday, August 15, 2016

Matlab: 拉伸渲染

Introduction

拉伸渲染单波段图片,需注意拉伸范围包括背景。为消除背景对拉伸范围的影响,只需将背景数值设置为有效区域数值即可,不大于最大值且不小于最小值,mask文件最终将会为背景赋上其它颜色。
拉伸颜色采自cbrewer,序列使用短名称:seq、div、qual,具体色带如Fig. 1。
Fig. 1
示例文件拉伸效果如Fig. 2,包含空间信息。
Fig. 2

References

Matlab: 图片背景扩大

Introduction

原图片置于更大背景。
Fig. 1