How do I integrate this equation?
古いコメントを表示
Hello, I have a problem trying to integrate. I have only been using MatLab for about 3 months now, very new to it.
This is the equation I am trying to integrate x(t) = (-0.75)^t *(u(t) - u(t-8)) I had to use the freqz function first, and now it's asking me to compare freqz to manually doing the Fourier Transform, which basically states taking the integral from negative infinity to positive infinity of x(t) * e^(-2pi*f*t) dt
I am kinda skipping a step and integrating from 0 to 8, it's 0 everywhere else (however if possible I'd like to know how to integrate from negative infinity to positive infinity). Anyways, that's basically what I'm trying to do, integrate, (-0.75)^t from 0 to 8. This is what I have currently but I keep getting errors. Should I be using 'integral' or 'int'?
clear all; close all;
t = [0:.01:10];
j = sqrt(-1);
syms f;
u1 = heaviside(t);
u2 = heaviside(t - 8);
x = ((-0.75).^t).*(u1 - u2);
y = ((-0.75).^t) .* exp(-2*pi.*j.*t.*f);
X = int(y, 0, 8);
plot(X);
採用された回答
その他の回答 (1 件)
DHARUN M
2020 年 5 月 18 日
0 投票
x^5+3cos(4x)-4x^3+2x^2+9x/tan(x)^2-sec(x^2-2x+3)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!