I'm trying to integrate, but I get an "undefined function" error.
Show older comments
This is my code:
syms ao an bn t
t = 0 : 0.1 : 2*pi;
x = sin(pi*t);
T = 2;
n = -10 : 1 : 10;
wo = (2*pi)/T;
ao = (1/T)*int(x, t)
an = (2/T)*int((x*cos(n*wo*t)), t)
bn = (2/T)*int((x*sin(n*wo*t)), t)
plot(ao, t, an, t, bn, t)
grid on
xaxis('t')
yaxis('x(t)')
Title('Coefficients of CTFS')
And this is the error I'm getting:

4 Comments
KSSV
on 3 Jun 2020
Copy paste the code here.......don't attach an image snippet.
Muhammad Faizan Asif
on 3 Jun 2020
Muhammad Faizan Asif
on 3 Jun 2020
Mohammad Sami
on 3 Jun 2020
My apologies, the function int is only available in symbolic toolbox.
You can refer to the documentations here.
Accepted Answer
More Answers (0)
Categories
Find more on Calculus 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!