Is there a standard formula for calculating the RMS value of a triangular waveform?
from pylab import *
dist, numpoints = 1.0, 100
x = arange(0, dist, dist/numpoints)
ypos, yneg = x, -x + 1
x = arange(0, 4*dist, dist/numpoints)
y = concatenate((ypos, yneg, yneg - 1, ypos - 1))
rms = sqrt(average(y*y))
plot(x, y)
title("RMS value of a triangle wave")
text(2.5, 0.7, "RMS = %.3g" % rms, fontsize=20)
grid(True)
show()