Error using fft Invalid data type. First argument must be double, single, int8, uint8, int16, uint16, int32, uint32, or logical. code example
Example: Error using fft Invalid data type. First argument must be double, single, int8, uint8, int16, uint16, int32, uint32, or logical.
t=0:0.1:1000;f1 = 2;f2 = 3;x =cos(2*pi*f1.*t) + sin(2*pi*f2.*t);X=abs(fft(x))/numel(t);plot(t,X);