MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Why am I unable to numerically integrate this? 

Subject: Why am I unable to numerically integrate this? From: KC Date: 22 Apr, 2010 20:46:22 Message: 1 of 7 
Im trying to integrate this expression (k^4*exp(k))/(exp(k)  1)^2 and need a matrix of values for different limits of integration . But for some reason i am getting NaN as the only answer. Any help would be much appreciated. 
Subject: Why am I unable to numerically integrate this? From: KC Date: 22 Apr, 2010 21:00:25 Message: 2 of 7 
Update: Well, I get answers upto n=449 (n=450 is 2*theta value). But after that i get NaN. Out of curiosity, I changed theta to 250, and I started getting values upto n=499. I wonder what is happening when n reaches 2*theta values. Why is it unable to compute beyond that? Please help. 
Subject: Why am I unable to numerically integrate this? From: Roger Stafford Date: 22 Apr, 2010 21:00:25 Message: 3 of 7 
"KC " <vistarak@gatech.edu> wrote in message <hqqciu$ip4$1@fred.mathworks.com>... 
Subject: Why am I unable to numerically integrate this? From: KC Date: 22 Apr, 2010 21:16:22 Message: 4 of 7 
> You have a singularity in the integrand at k = 0. It is not integrable if zero is included in the range of integration. 
Subject: Why am I unable to numerically integrate this? From: Roger Stafford Date: 22 Apr, 2010 21:27:08 Message: 5 of 7 
"KC " <vistarak@gatech.edu> wrote in message <hqqeb6$kg6$1@fred.mathworks.com>... 
Subject: Why am I unable to numerically integrate this? From: Roger Stafford Date: 22 Apr, 2010 22:15:19 Message: 6 of 7 
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hqqevc$3gn$1@fred.mathworks.com>... 
Subject: Why am I unable to numerically integrate this? From: Michael Hosea Date: 23 Apr, 2010 16:24:20 Message: 7 of 7 
As already noted, you can move away from 0 slightly. Another alternative is 
No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.