'Why i am getting blank graph?How can i solve this issue?

I am trying to plot symbolic variable in MATLAB, for which I have used the same strategy that is available in an answer to a similar question.

This is my code, which outputs a blank graph:

syms t w
x=exp(-t^2)
h=exp(-t)*heaviside(t)+exp(t)*heaviside(-t)
X=fourier(x,w);
H=fourier(h,w);
right=ifourier( rewrite(X*H, 'exp'),t)
fplot(right,[0 8])

How can I make the graph appear?



Solution 1:[1]

The problem is that MATLAB ifourier function cannot compute the inverse Fourier transform of the product X*H.

Check that X*H returns:

X*H

enter image description here

Rewriting the expression does not change it at all:

rewrite(X*H, 'exp')

enter image description here

Either way, when computing the inverse Fourier transform:

right=ifourier( X*H,t)

enter image description here

Documentation on the ifourier function states that:

If ifourier cannot transform the input, then it returns an unevaluated call to fourier.

Since it cannot evaluate explicitly the function, it cannot plot it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Thales