I am reading a book of Alex Palamides, chapter 6, Fourier transform and I am trying to compute the inverse transform of a function, but when I write the code provided in the book in MATLAB, I do not get the expected answer, as written in the book.
Here is a snapshot of the book, the output of the inverse fourier command is highlighted (it contains a heaviside
term):
When I write the same code in MATLAB, I get:
answer = (exp(-t)*(sign(t) + 1))/2
My code is as follows:
clc
clear all
syms w t
X=1/(1+j*w);
ifourier(X,t)
The answer is correct, matlab just by default uses sign function instead of Heaviside. Check it by typing the code
check = isequal(heaviside(t),(sign(t) + 1)/2)
check = 1 --->True