Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1498
Number of posts: 2178

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
problem with integral Posted by theo2008 on 29 Nov 2008 at 1:16 AM
hi my friends.
I have a problem and i want your help.I have the next code.I want to find the integral(0,inf) of final for v=-12:0.05:2.for one value of v,for example
-11.95,the code gives me a result.When i try to change the value of v,-10.95 for example the value of subtotal is again the same and i dont know why.Why this happens?is there a problem in my code?Do you know what can i change to have for each value of v the equivalent subtotal and total?Because i want to make a plot(vdot,total) and with this code i think that the result will be a straight line which is wrong.
A=12.56e-4;
L=0.44;
vdot=v/L
G=2;
T=300;
q=1.6e-19;
k=8.62e-5;
%Edot between 0.01-0.7
Edot=0.01;
%Ndot between 10^8-10^15
Ndot=10^8;
%DE between 0.01-0.5
DE=0.05;
syms E;

denom=1+exp((E-q*vdot)/(k*T));
function1=1./denom;
static=(G*Ndot)/(sqrt(pi/2)*DE);
ek8eths=((E+Edot+q*vdot)/DE).^2;
function2=exp(-2*ek8eths);
function3=function1.*static;
final=function3.*function2;

%or if i try final=function1.*function2.*static is correct?

subtotal=double(int(final,E,0,inf))
total=q*A*L*subtotal

Maybe if i try to solve it with gaussian integral?But i dont know how to use this method...



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.