From: Maxx Chatsko on
Hello all,
My Matlab code works fine, I just want it to be a little faster (don't we all). I have a GUI with about 10 functions inside of it. Are there any general tips or tricks for making the program work faster? For instance, can I skip over code when its not in use or condense sections into more functions? Thanks for your thoughts and ideas.
Maxx
From: Andy on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message <i179i4$d55$1(a)fred.mathworks.com>...
> Hello all,
> My Matlab code works fine, I just want it to be a little faster (don't we all). I have a GUI with about 10 functions inside of it. Are there any general tips or tricks for making the program work faster? For instance, can I skip over code when its not in use or condense sections into more functions? Thanks for your thoughts and ideas.
> Maxx

Have you run the profiler to see what parts of the code are running slowly?
From: Image Analyst on
Maxx Chatsko:
It's already a recorded webinar:
http://www.mathworks.com/company/events/webinars/wbnr34269.html?id=34269&p1=723911099&p2=723911117

"In this webinar we will describe strategies and techniques for speeding up your MATLAB applications. This will include tips on how to optimize the performance of the MATLAB code itself and it will show how to use the MATLAB family of products to take advantage of advances in hardware, such as multicore machines and computer clusters.

This webinar is targeted toward people already familiar with MATLAB.

Presenter: Sarah Wait Zaranek, Ph.D."
From: Maxx Chatsko on
"Andy " <myfakeemailaddress(a)gmail.com>
> Have you run the profiler to see what parts of the code are running slowly?

Ran the profiler...most of my time is taken up with ~feval~. I'm reading data from images, so I assume I just have to suck it up and deal with the time (150s).
From: Mark Hayworth on
"Maxx Chatsko" <chatskom(a)chemimage.com> wrote in message :
> Ran the profiler...most of my time is taken up with ~feval~. I'm reading data from images, so I assume I just have to suck it up and deal with the time (150s).
-------------------------------------------------------------------
I never use feval and I deal with images constantly in every app I develop. The help says "Note It is not necessary to use feval to call a function by means of a function handle. This is explained in in the MATLAB Programming Fundamentals documentation." Why do you think you need to use feval? Why not just call the function directly?
-ImageAnalyst