How to use a function f (x) given via graphical interface to perform calculations?

1

How do I get the function given by the user, and in the places of x, go changing by the numerical values? I tried the code below, but I am not receiving any value of y:

  try: #carregamento distribuído axial f(x)
      if (self.ql_distloads[str(i)+str(6)].text()  != 0):  #captura a função dada pelo usuário via interface grafica
          valuesx = np.arange(0.0, self.lista_tam[i], 0.05)  #determina o intervalo numerico                    
          self.listax.append(valuesx)
          x = sp.symbols('x')

          for l in valuesx: #pega  os valores de x e substitui na função f(x)            
                fy = (self.ql_distloads[str(i)+str(6)].text())
                func = fy.subs(x,l)
    
asked by anonymous 12.09.2018 / 19:31

0 answers