how do I integrate a function with varying limits?

7 ビュー (過去 30 日間)
Deen Halis
Deen Halis 2015 年 5 月 17 日
コメント済み: Deen Halis 2015 年 5 月 17 日
Please how do I integrate a function with varying limits? I wish to run it as a script so that i can get the values of each integrand and later plotting it.
Below is what i tried on matlab but had errors:
m = 3;
w = 30;
p = 30;
G = 0.01;
F = cos (w*T)* exp(G/2*p*T)*cos(p*T);
a = 0.005:0.005:0.2;
b = 0.005+a;
f1 = int(F, a, b)
disp(double(fi))

採用された回答

Walter Roberson
Walter Roberson 2015 年 5 月 17 日
m = 3;
w = 30;
p = 30;
G = 0.01;
syms A T
F = cos (w*T)* exp(G/2*p*T)*cos(p*T);
f1 = int(F, T, A, A+0.005);
a = 0.005:0.005:0.2;
fa = double(subs(f1, A, a));
plot(a, fa);
  1 件のコメント
Deen Halis
Deen Halis 2015 年 5 月 17 日
thanks very much, much more for the quick response! it worked.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by