%% transformada de Laplace/Fourier % transformada de laplace clearvars; %close all; clc; %parametros del espacio Lsig = 3; %limite espacio x real Lomg = 3; %limite espacio y imaginario dsig = 0.05; %incremento en x real domg = 0.05; %incremento en y imaginario %grilla desde -Lsig a Lsig vs -Lomg a Lomg [sig,omg] = meshgrid(-Lsig:dsig:Lsig , -Lomg:domg:Lomg); %variable compleja s = sig - j*omg; %la transformada del coseno cos(t) Lcost = s./(s.^2 + 1^2); %graficamos parte real e imaginaria de la transformada de laplace figure(1) contour(sig,omg,real(Lcost),100); title('Parte Real Transformada de Laplace Funcion cos(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Re[L{cos(t)}]'); colormap jet; colorbar; grid on; box on; figure(2) contour(sig,omg,imag(Lcost),100); title('Parte Imaginaria Transformada de Laplace Funcion cos(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Im[L{cos(t)}]'); colormap jet; colorbar; grid on; box on; figure(3) mesh(sig,omg,real(Lcost)); title('Parte Real Transformada de Laplace Funcion cos(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Re[L{cos(t)}]'); colormap jet; colorbar; grid on; box on; figure(4) mesh(sig,omg,imag(Lcost)); title('Parte Imaginaria Transformada de Laplace Funcion cos(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Im[L{cos(t)}]'); colormap jet; colorbar; grid on; box on; %la transformada de la funcion exponencial exp(-x) Lexpt = s./(s + 1); %graficamos parte real e imaginaria de la transformada de laplace figure(5) contour(sig,omg,real(Lexpt),100); title('Parte Real Transformada de Laplace Funcion exp(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Re[L{exp(t)}]'); colormap jet; colorbar; grid on; box on; figure(6) contour(sig,omg,imag(Lexpt),100); title('Parte Imaginaria Transformada de Laplace Funcion exp(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Im[L{exp(t)}]'); colormap jet; colorbar; grid on; box on; figure(7) mesh(sig,omg,real(Lexpt)); title('Parte Real Transformada de Laplace Funcion exp(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Re[L{exp(t)}]'); colormap jet; colorbar; grid on; box on; figure(8) mesh(sig,omg,imag(Lexpt)); title('Parte Imaginaria Transformada de Laplace Funcion exp(t)') xlabel('\sigma'); ylabel('j\omega'); zlabel('Im[L{exp(t)}]'); colormap jet; colorbar; grid on; box on;