Skip to Main Content Skip to Search
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Ken & Mike on the MATLAB Desktop

July 14th, 2008

Browsing vs Searching

One of our big team efforts is making information in MATLAB more accessible. When figuring out how to the present and teach new features, we often wind up at the “browsing versus searching” discussion (i.e. what are users preferred methods for finding information). The following is a list of the current ways to browse and search for functions, but we are investigating new ones and are always curious how are customers find out (or don’t find out) how to use our products.

Browsing is great for exploring to find new features, gaining insight in to how we organize things, and for when you just don’t know exactly what you’re looking for. When it comes to finding functions, I quickly thought of two ways of browsing: the MATLAB documentation and tab completion.

Function list in the documentation
For me, when I want to find a function nine times out of ten, I’ll go to the “Function Reference” (”Functions - By Category” in earlier versions) section of the MATLAB documentation:

Function Reference

Tab completion
As we previously described, you can use tab completion to find all functions that start with a particular letter (”sl” is a good bet for simulink functions) or to find methods of an object after a period “.”.

Searching is browsing’s non-linear cousin: the search engine sifts through information to find the thing you’re looking for. There’s a few ways to go about searching for functions, each provides its own powers and flexibility but requires good querying skills to narrow down the results.

MATLAB documentation
You can search in the help browser’s search bar. Once you understand the documentation’s literary style you can find things quite effectively. We previously blogged about how to narrow the search results.

You also have two documentation search options from the command line docsearch which performs the same search as the help browser search bar, and displays the results in the help browser, and lookfor which searches the H1 lines of all the m-files in your path. The first time you run this will be the slowest as it will have to search your path. Lookfor and docsearch might give different results depending how comprehensive the H1 line of the M-file is. lookfor will also search your own m-files if they are on the path.

Google
Of course, you can always use Google’s search engine to search our online documentation. Just append site:http://www.mathworks.com/access/helpdesk/help to your search to narrow the results to the MATLAB doc.

While we’re on the Google topic, you can search the whole internet for text in M-files using Google’s codesearch, again just append lang:matlab to the search to just search M-files.

Find Files
When you want to search your own non-internet based code, you can use Find Files. We previously discussed Find Files in this post.

Function Reference

 
We have many great new features in the pipeline to enhance both browsing and searching. In the meantime tell us how you go about finding new functions to use.

3 Responses to “Browsing vs Searching”

  1. Quan replied on :

    Hello Michael,

    Whenever I need to find a particular function, I usually try to guess the function name

    
    help *******
    

    and hope that I get lucky. Or if I know that the function that I want to use is related to a function that I already know, I try to find that function by means of association.

    Usually a google search is the best way for me to find a function that I am unfamiliar with. Just today I was looking for a “swap variables” function because I was too lazy to write my own, although I wasn’t able to find it :(

  2. Mike replied on :

    Quan,

    Excellent suggestion. You probably tried this, but don’t forget about searching the MATLAB File Exchange.

  3. Jiro replied on :

    Yes, if you search the File Exchange, you’ll find SWAP, which was inspired by the file featured here:

    http://blogs.mathworks.com/pick/2008/04/18/renaming-variables/

Leave a Reply


Ken & Mike work on the MATLAB Desktop team.
  • Ken: Hi Rich, We have a bug report on the first issue you mention. As for the Command Window time-stamp format,...
  • Rich Messeder: I have a few comments that I’m trying to find the right place for. One is that when I press the...
  • Steve Eddins: Stephen—You can extend your R2008b Prerelease license by choosing the Help -> Licensing ->...
  • Mike: Stephen, We cannot give an exact date as to when the next version of MATLAB will be released.
  • Stephen Colona: Do you think the new release will come out before the PreRelease expires? Thanks.
  • Mike: Nasir, Thank you for your feedback, it helps us refine the desktop and ultimately make it easier to use....
  • Nasir: sent my desktop.
  • Mike: Han, We are always investigating new ways to enhance the MATLAB language and improve the desktop experience. I...
  • Han Geerligs: Hello Mike, first, thanks for mentioning me ;-) I was wondering if you plan to introduce more pragma...
  • Tom Clark: FOUR buttons? You’re spoiling yourselves :) Think about this… I’m pretty sure...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.

Related Topics