在Praat中,我需要编写一个脚本,在这个脚本中我可以创建一个包含多列的表。然后还将数据插入到这些列中。
请告诉我怎么做好吗?
发布于 2014-10-31 14:02:05
可以使用适当命名的Create Table with column names...命令创建具有列名的Table对象。您可以为它提供对象的名称、行数和一个包含列名称的字符串,用空格分隔。
要将值插入到表中,需要将其选中,然后根据要插入的数据类型使用Set numeric value...或Set string value...。
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)
endforhttps://stackoverflow.com/questions/26661639
复制相似问题