Using symbolic integration: Undefined function 'int' for input arguments of type 'double'.
Show older comments
Hello, I am trying to write a program that will allow me to approximate the Fourrier transform of an input function, an impulse response function, and find the output function using symbols for t and w0. When using the int function for my t symbol I get no errors. However with the w symbol I get the error in the question title. Here is my code, can someone tell me what I am doing wrong?
clf;
clear all;
syms t w0
x = exp(-3*t)*heaviside(t);
h = exp(-2*t)*heaviside(t);
integrand_x = x*exp(-1j*w0*t);
integrand_h = h*exp(-1j*w0*t);
X = int(integrand_x, t, -10000, 10000);
H = int(integrand_h, t, -10000, 10000);
Y = H*X;
integrand_y = Y*exp(1j*w0*t);
y = int(integrand_y, w0, -10000, 10000);
y = y/(2*pi);
ezplot(y, [-5, 0.01, 5]);
axis([-5 5 -1 1]);
2 Comments
Geoff Hayes
on 23 Nov 2014
Bryan - is integrand_y a symbolic expression or a double? What is w0? In the Command Window type
class(w0)
class(integrand_y)
What is returned from each of these two calls?
Bryan
on 23 Nov 2014
Accepted Answer
More Answers (0)
Categories
Find more on Calculus in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!