2014-10-30 8 views
0

Praat에서 여러 개의 열이있는 테이블을 만들 수있는 스크립트를 작성해야합니다. 그런 다음 해당 열에도 데이터를 삽입하십시오.PRAAT에 열 삽입

알려 주시면 알려주세요.

답변

0

적절하게 명명 된 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) 
endfor