How to do integrals and fft on matlab
Show older comments
I am extremely new to using matlab and I am trying to get the basic integral function to work. I want to find the fft of a function, and the integral to graph. However, whenever I use the int function, I get errors.
int(sqrt(2)*cos((pi/2)*t).*exp(-j*w*t),t)
gives me the error "Undefined function 'int' for input arguments or 'double'."
It may be easier to just do the fft of the original function sqrt(2)*cos(pi/2*t) but I can't seem to get this to work and give me a graph of the spectrum either. Any thoughts?
1 Comment
Torsten
on 22 Oct 2018
You defined w and t as syms ?
Accepted Answer
More Answers (0)
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!