António Galante Posted December 21, 2020 at 07:06 PM Report Share #620801 Posted December 21, 2020 at 07:06 PM Boas estou com uma dúvida em relação a funções. Eu pretendo criar um gráfico com uma função num intervalo de tempo. Entretanto não sei como criar uma lista com os termos da função para cumprir um certo requisito. Não estou a conseguir criar o eixo do y xmin = 0 xmid = 1.5 xmax = 4 p_min= int(xmin/h) p_mid= int(xmid/h) p_max= int(xmax/h) #---------------------------------------------------------------- # Função para derivar e integrar #---------------------------------------------------------------- def funcao(t): if t <= xmid: return 2*np.sin(1.5*(t)) else: return 2*np.sin(1.5*(xmid))*xmid**2/t**2 #---------------------------------------------------------------- x=[h*n for n in range(p_min,p_max)] y=[funcao(f[t]-f[t-1]/h) for t in x] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now