首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在PRAAT中插入列

在PRAAT中插入列
EN

Stack Overflow用户
提问于 2014-10-31 03:25:28
回答 1查看 560关注 0票数 0

在Praat中,我需要编写一个脚本,在这个脚本中我可以创建一个包含多列的表。然后还将数据插入到这些列中。

请告诉我怎么做好吗?

EN

回答 1

Stack Overflow用户

发布于 2014-10-31 14:02:05

可以使用适当命名的Create Table with column names...命令创建具有列名的Table对象。您可以为它提供对象的名称、行数和一个包含列名称的字符串,用空格分隔。

要将值插入到表中,需要将其选中,然后根据要插入的数据类型使用Set numeric value...Set string value...

代码语言:javascript
复制
columns$ = "index text number"
rows = 10
table = Create Table with column names: "table", rows, columns$
for i to rows
  # The table is already selected, but it's always a good idea
  # to confirm the selection at the beginning of a for loop
  selectObject: table
  Set numeric value: i, "index",  i
  Set numeric value: i, "number", randomGauss(0, 0.1)
  Set string value:  i, "text",   "this is row " + string$(i)
endfor
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26661639

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档