data.col:rms d column {time TIME}
| d | data-object name |
| column | column for rms calculation |
| time | time column (default = TIME) |
| return rms value of the specified column rms = sqrt(integ(column^2 * dt)/(t2-t1)) |
d.col rms VOUT Time
previously, rms returned sqrt(sum(column^2)/N)
which is the result for constant time-steps:
set n [$d length]
foreach stat [$d.col stats $column] {
set [lindex $stat 0] [lindex $stat 1]
}
return [expr sqrt(1.0*$sos/$n)]
|