integration error

I am trying to use integration with MATALB. initially it was showing error as Conversion to double from sym is not possible
here is my code.. please assist
a=3.6;
N0=-174;
fq=3.5*10^9;
c=3*10^8;
R=100;
G0= (c/(4*pi*fq))^2;
P=1;
Te= abs((P*G0)/(N0*(R^a)));
syms x;
t=(.1:.1:.5);
for p=.1:.1:.5
S=abs(((x-sqrt(3))^-a )+((x+sqrt(3))^-a )+ 2*(((x-sqrt(3/2))^2 + (9/4)))^(-a/2)+ 2*(((x+sqrt(3/2))^2 + (9/4)))^(-a/2))
k=1+(Te*S);
f1=(x*log2(1+(Te/x^a*(k))));
q=(int(f1,0,1));
f2=x*t*log2(1+ (Te/x^a));
w=(int(f2,0,1));
f3=x*(1-t)*log2(1+ (Te/x^a));
e=(int(f3,0,1));
C= 20*pi*10^6*(q+(w/3)+(e/3));
plot(t,double(C));
hold on ;
grid on ;
end

4 件のコメント

Ashesh
Ashesh 2012 年 3 月 29 日
I am not getting any graph though the error is gone after I used plot(t,double(C));
Jan
Jan 2012 年 3 月 29 日
Please format your code as explained in the "Markup help" link on this page.
Walter Roberson
Walter Roberson 2012 年 3 月 29 日
This is not the same code as you emailed to me, and when you emailed me you did not indicate what problem you had observed. Unless I was supposed to guess which program had generated that AutoSave (.asv) file and figure out how to restore it to see an error message?
Ashesh
Ashesh 2012 年 3 月 30 日
this is the actual code..I have made some changes into it after reading several threads over here. but still the execution is taking too much time and the graph is not what I was expecting.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2012 年 3 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by