Mike on the MATLAB Desktop

September 10th, 2007

Where did my M-file run off to?

After you have been writing M-code for a while you gather lots of M-files possibly scattered over many directories. Finding that one piece of text that you are looking for without exactly knowing where it is, is difficult. The Find Files tool is perfect for this kind of task.

Find Files is accessible from the “Edit” menu, “Find Files…” menuitem.

Recently I was working on some M-code that generates a web photo gallery from a directory of images. I went back to work on it a couple of weeks later and couldn’t remember where I had stored the files. To find the code I will use the Find Files tool to search my home directory.

Incremental Search Box


Now that I’ve found it, I can turn on the option to see full pathnames to see exactly where the file lives. I didn’t really even need the full pathname since I can just double click to open the file in the editor to the line that was found.

Incremental Search Box


One Response to “Where did my M-file run off to?”

  1. Sung Soo replied on :

    This is fantastic tool to use for various purpose in addition to MATLAB. I used EditPlus for this purpose but it was not handy. Finding texts in MATLAB is wonderful. Thank you for this great tool.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks
Mike works on the MATLAB Desktop team.

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