# ¿A que se debe que en el comienzo las gráficas no sean iguales?

1 visualizzazione (ultimi 30 giorni)
Pablo Álvarez García il 12 Feb 2022
Risposto: Prasanna Konyala il 18 Feb 2022
Why is it that at the beginning the graphs are not equal? One is Laplace, one is Fourier.
%% 5
close all
clear all
syms t s w
Gs=1/(s^2+5*s+6);
Gjw=subs(Gs,s,j*w);
U=cos(pi*t/4).*cos(pi*t/3);
Ujw=fourier(U);
Yjw=Gjw*Ujw;
y=ifourier(Yjw,w,t);
time=0:0.01:50;
yyf=subs(y,t,time);
syms t s
Gs=1/(s^2+5*s+6);
U=cos(pi*t/4).*cos(pi*t/3);
Us=laplace(U);
Ys=Gs*Us;
y=ilaplace(Ys,s,t);
time=0:0.01:50;
yyl=subs(y,t,time);
figure(5)
plot(time,yyf,'LineWidth',2); grid on; hold on; plot(time,yyl);
Warning: Imaginary parts of complex X and/or Y arguments ignored.
title("Comparación de las respuestas del sistema");
legend("Fourier","Laplace"); ##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Prasanna Konyala il 18 Feb 2022
Hi,
From my understanding, you are trying to plot and check output using Fourier and Laplace.The output produced by Fourier transform may not be obtained from Laplace transform by replacing s with jw (e.g: Step function). In this case, the value Ujw is not same as Us when s is replaced by jw. So, the convoluted results Us and Ujw can differ which leads to different outputs at the beginning and is converging as time increases. This is not a MATLAB issue.
##### 0 CommentiMostra -1 commenti meno recentiNascondi -1 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Calculus in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!