Buscar

Questao3.2

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 8 15:44:38 2018
@author: wagberg
"""
import sympy as sp
import numpy as np
import matplotlib.pyplot as plt
a = [-4,-1,0,1,4]
t = np.linspace(-2,2)
s, t = sp.symbols('s, t')
w = sp.symbols('w', real = True)
expression = (a*s + 3)/(s**2 + 4*s + 12)
z = sp.inverse_laplace_transform(expression, s, t)
print(z)
impulso = (np.exp(-2*t)*(np.sin(2*np.sqrt(2)*t) + 2*np.sqrt(2)*np.cos(2*np.sqrt(2)*t)))/(2 *np.sqrt(2))
degrau = (1/8)*np.exp(-2*t)*(2*np.exp(2*t) + np.sqrt(2)*np.sin(2*np.sqrt(2)*t) - 2*np.cos(2*np.sqrt(2)*t)) 
plt.figure()
plt.plot(t,impulso)
plt.title('Questão 3')
plt.xlabel('Tempo')
plt.ylabel('Impulso')
plt.grid
plt.figure()
plt.plot(t,degrau)
plt.title('Questão 3')
plt.xlabel('Tempo')
plt.ylabel('Degrau')
plt.grid()
plt.show()

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais