Matlab code that accompanies Ludwig & Gilchrist (2002). Measuring saccade curvature: A curve fitting analysis. Behaviour Research Methods, Instruments, & Computers.
I apologise that the link given in that paper is no longer active. I still get requests for this code, so I thought I'd make it available here. I’m surprised no one else has made open-source code available to do this kind of stuff (e.g. in R or Python). We published this in 2002 when I was much younger and certainly much less wiser. I am pretty sure that if I had to write these functions afresh, I would be able to do so much more elegantly and efficiently. So don't be surprised if you see some clunky code. However, it should all work and the computations are sufficiently easy for it not to take ages.
The code is reasonably well documented. The require a Nx4 sample matrix as input. In my applications, the four columns were: block number; trial (or saccade) number; sample x-coordinate; sample y-coordinate. However, the first column will essentially be ignored. All the functions will do is monitor the second column for a change in order to select the samples that belong to the current movement of interest. Once the samples have been selected you can calculate the various curvature metrics.
The main functions of interest (to most people) would be ComputeCurve and CurveMetrics. The former computes the curvature using the curve fitting approach we advocated almost 20 years ago. The CurveMetrics function fits a whole bunch of metrics. Note that the integration method (area under the curve) metric is particularly crude (and, really, just wrong). If you want to use this metric, I suggest you use something more up-to-date such as the 'trapz' function in Matlab.
没有合适的资源?快使用搜索试试~ 我知道了~
matlab中trapz函数源代码-saccadeCurvature2002:Ludwig&Gilchrist(2002)随附的...
共5个文件
m:4个
md:1个
需积分: 47 5 下载量 149 浏览量
2021-06-20
06:10:16
上传
评论
收藏 9KB ZIP 举报
温馨提示
matlab中trapz函数源代码Ludwig & Gilchrist (2002) 随附的 Matlab 代码。 测量扫视曲率:曲线拟合分析。 行为研究方法、仪器和计算机。 我很抱歉那篇论文中给出的链接不再有效。 我仍然收到此代码的请求,所以我想我会在这里提供它。 我很惊讶没有其他人提供开源代码来做这种事情(例如在 R 或 Python 中)。 我们在 2002 年发表了这篇文章,当时我还年轻得多,当然也不那么聪明。 我很确定,如果我必须重新编写这些函数,我将能够更优雅、更高效地完成这些工作。 因此,如果您看到一些笨拙的代码,请不要感到惊讶。 但是,它应该都可以工作,并且计算足够容易,不需要花费很长时间。 该代码的文档相当完善。 需要一个 Nx4 样本矩阵作为输入。 在我的应用程序中,四列是:块号; 试验(或跳视)次数; 样本 x 坐标; 样本 y 坐标。 但是,第一列基本上将被忽略。 所有功能都将监视第二列的变化,以便选择属于当前感兴趣的运动的样本。 选择样本后,您可以计算各种曲率度量。 (对大多数人而言)感兴趣的主要功能是 ComputeCurve 和 CurveMetrics。
资源详情
资源评论
资源推荐
收起资源包目录
saccadeCurvature2002-master.zip (5个子文件)
saccadeCurvature2002-master
normcurve.m 5KB
ComputeCurve.m 3KB
README.md 2KB
CurveMetrics.m 7KB
MCsim.m 6KB
共 5 条
- 1
weixin_38645266
- 粉丝: 4
- 资源: 948
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0