0

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):

Snapshot

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)
Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
LECS
  • 121
  • 12

1 Answers1

1

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

Mathematical Proof

enter image description here

Adam
  • 2,726
  • 1
  • 9
  • 22