Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


EBS
Posts:
77
Registered:
2/11/09


Re: Speed up fairly short code
Posted:
Jul 16, 2013 11:26 AM


"Steven_Lord" <slord@mathworks.com> wrote in message <ks3jql$4jb$1@newscl01ah.mathworks.com>... > > > "Kobye " <kobye.bodjona@gmail.com> wrote in message > news:ks1luv$i3h$1@newscl01ah.mathworks.com... > > I have a code (script) of 462 lines. In parts, it uses the symbolic > > toolbox. It also makes calls to 3 other functions that I have written, > > that are already highly efficient. > > > > The code is a mechanical model (theory of elasticity) that describes two > > plates joined by adhesive. The model is very elegant in its formulation, > > but currently it is way too slow. I have the option of either discarding > > it, or massively speeding it up. I have reason to believe that large speed > > increases are feasible (similar models exist and have been used for > > sensitivity analyses in the literature). > > > > If anyone would like to help me find ways to speed it up, your help would > > be immeasurably appreciated. I will send you the code privately as I don't > > necessarily want it in the public domain. > > > > Kobye > > > > PS the main bottlenecks seem to be symbolic integrations of my Bernstein > > basis polynomials. I think that maybe the code could be sped up here by > > using the Matlab poly options, but I am totally unfamiliar with these. > > Try converting that symbolic integration into numeric integration using > matlabFunction, FEVAL, or EVALIN (as shown in the Tips section of the > documentation page below) and INTEGRAL. > > http://www.mathworks.com/help/symbolic/matlabfunction.html > >  > Steve Lord
Steve, do you think this type of situation could be detected by Mlint and highlighted in the Editor?



