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 Exchange에서 MATLAB에 대해 자세히 알아보기

태그

질문:

2012년 3월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by