Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > Mathematics Software Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old May 28th, 2009, 03:07 AM
Newbie
 
Join Date: May 2009
Posts: 12
Country:
Thanks: 5
Thanked 0 Times in 0 Posts
shaileshdhutekar is on a distinguished road
Default matlab programme too long to run

hi all..
actually my code is taking too long to run.i am numerically
integrating equation using quad.i think reason behind code taking
so much time is that there are lot of singularities coming while
integrating the expression.So while going thro' these
discontinuities ODE45(i also used) is taking very small steps and
hence it is taking hours to run the code.
possible solution to thses kind of stiff equations is to use ODE15s.I
tried that too but its accuracy is far too low and hence it is not
showing appropriate results.
If u have any other solution to this problem ..plz suggest me.
thank U!
Reply With Quote
Advertisement
 
  #2  
Old May 30th, 2009, 11:24 PM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 12,285
Country:
Thanks: 779
Thanked 4,005 Times in 3,230 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by shaileshdhutekar View Post
hi all..
actually my code is taking too long to run.i am numerically
integrating equation using quad.i think reason behind code taking
so much time is that there are lot of singularities coming while
integrating the expression.So while going thro' these
discontinuities ODE45(i also used) is taking very small steps and
hence it is taking hours to run the code.
possible solution to thses kind of stiff equations is to use ODE15s.I
tried that too but its accuracy is far too low and hence it is not
showing appropriate results.
If u have any other solution to this problem ..plz suggest me.
thank U!
Where are they and what type of singularities are we talking about here?

In general I would switch to a fixed step length method (in fact Euler or a simple predictor corrector based on Euler) and use a small step.

(and possibly use a number of step lengths and look at how the answer changes with step length and then consider Richardson extrapolation).

CB
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 05:13 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.