Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!w5g2000prd.googlegroups.com!not-for-mail
From: Rex <rex.eastbourne@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to be a good Matlab programmer
Date: Mon, 21 Apr 2008 08:20:08 -0700 (PDT)
Organization: http://groups.google.com
Lines: 54
Message-ID: <6fc16c8b-db8d-4e33-9b4e-24cba54fc359@w5g2000prd.googlegroups.com>
References: <d6f9728b-07d7-4ebc-8264-e2485cde6259@c65g2000hsa.googlegroups.com> 
NNTP-Posting-Host: 140.247.249.90
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1208791295 22251 127.0.0.1 (21 Apr 2008 15:21:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 21 Apr 2008 15:21:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w5g2000prd.googlegroups.com; posting-host=140.247.249.90; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) 
Xref: news.mathworks.com comp.soft-sys.matlab:464330


On Apr 20, 10:40 pm, "Steven Lord" <sl...@mathworks.com> wrote:
> "Dave Bell" <db...@TheSPAMFREEBells.net> wrote in message
>
> news:u8xOj.1371$26.1046@newssvr23.news.prodigy.net...
>
>
>
> > Rex wrote:
> >> On Apr 19, 7:23 pm, dpb <n...@non.net> wrote:
>
> >>> I assume you've read the section in the online documentation on
> >>> "Optimizing Matlab Code" in the m-file programming section?
>
> >>> --
>
> >> Yes, I have; that is the type of resource I am looking for. However, I
> >> want to be clear that I'm not just looking for tips on optimizing the
> >> performance of my code;  I also want to learn to write more elegant
> >> and concise code.
> >> Rex
>
> > That was a good example of what I encountered as a new Matlab user, as
> > well. It's an entirely different programming paradigm, and it takes a
> > while to get used to. (I still program Matlab like C!)
>
> > Another issue I ran into was simply searching for help. When I was trying
> > to speed up a project I was working on, someone suggested using benchmark
> > before and after changing some code. Not wanting to seem dumber than I
> > was, I didn't ask how to benchmark my code, I just figure I'd look it up.
> > Try it - there is no such command. One of the two hits I got from 'Help
> > benchmark' was an article on training a neural net, the other was about a
> > Simulink model of a Physics 1 experiment with a cart and mass. I won't
> > admit to how long it took to find 'bench'!
>
> Actually, I think what you want is the Profiler:
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f9-1...
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/profile.html
>
> If you encounter a situation like this in the future, where searching the
> documentation or the website using your keyworks doesn't find the
> information you want, please let our documentation staff know what you
> searched for and what you expected to find with those keywords.  On most if
> not all of the documentation pages on the website, there's a link in the
> upper-right corner of the frame showing the doc page that allows you to
> provide feedback.  This will let our documentation staff make it easier to
> find that information.
>
> --
> Steve Lord
> sl...@mathworks.com

Thanks for the replies, everyone! Those were really helpful and useful.