Jump to content
  • Advertisement
Sign in to follow this  
theo2008

script problem in matlab

This topic is 3610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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... Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!