the plot of my function EFF is always zero, but print
The code:
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
What is the question?
first of all I'm sorry for the messy post ,but when I written this I was tired ad upset. The question is the function EFF(x,2) is not zero (linear) in x:{0.5,2} but plot(EFF(x,2),x,0,3) is zero everywhere