sage: cnodo=[] sage: cnodo.append(0) sage: cnodo.append(.5) sage: cnodo.append(1.4) sage: cnodo.append(2) sage: def EFF(x,nodo): ....: c1=cnodo[nodo] ....: c2=cnodo[nodo+1] ....: EFF=0 ....: if (x>=c1) and (x <= c2) ....: EFF=(c2-x)/(c2-c1) ....: return EFF