I am trying to graph the Fourier transform of this signal, but it keeps giving me this error:
Error using fft Invalid data type. First argument must be double, single, int8, uint8, int16, uint16, int32, uint32, or logical
What can I do?
This is my code:
syms x
h=(2*heaviside(x-1))-2*heaviside(x-2)
fplot(h, [-4, 4])
xlabel('t');title('x(t)')
F=fft(h);
fplot((F))