フィルターのクリア

Integration In Matlab

1 回表示 (過去 30 日間)
Pranjal Pathak
Pranjal Pathak 2012 年 3 月 23 日
Thanks to andrei bobrov for your answer! Yes R1=R2. Your coding seems to work, but the value(answer) is a huge one to know the exact value. Can we command in MATLAB to give the calculated result only upto 4 decimal place.
syms r R1=sqrt(3)*(2*r.^2-1) R2=sqrt(3)*(2*r.^2-1) b = .7; S=2*pi*imag(int(exp(1i*b*R1)*r,r,0,1)*int(R2*exp(-1i*b*R1)*r,r,0,1)) out = vpa(S);
  2 件のコメント
Jan
Jan 2012 年 3 月 23 日
Please post comments to answers in the corresponding thread.
Alexander
Alexander 2012 年 3 月 23 日
Also, if something works for you, could you please accept the answer? So others know that the matter is resolved.

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

採用された回答

Alexander
Alexander 2012 年 3 月 23 日
Just use double:
syms r
R1=sqrt(3)*(2*r.^2-1)
R2=sqrt(3)*(2*r.^2-1)
b = .7;
S=2*pi*imag(int(exp(1i*b*R1)*r,r,0,1)*int(R2*exp(-1i*b*R1)*r,r,0,1))
out = vpa(S);
double(out)
ans =
-0.7308
Or if you don't need vpa you can do out = double(S) directly.
  1 件のコメント
Pranjal Pathak
Pranjal Pathak 2012 年 9 月 7 日
Thanks!

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by