Several years ago, Loren wrote a blog post encouraging people to share the contents (at least thematically) of their startup files. A lengthy and interesting discussion ensued--it's still worth a read. More recently (last week, in fact!), Sean guest-selected as a Pick-of-the-Week Kevin Bartlett's very useful submission that facilitates the saving of "projects"; I wanted to follow Sean's post with a lighter-weight approach to resuming one's previous coding activities in MATLAB.
When I close MATLAB in the middle of working on a project (or projects), I typically leave relevant editor documents open--whenever it's not inconvenient to do so. That way I can right-click on the tab for an open document and change, relatively painlessly, to its parent directory:
I haven't (yet) implemented Kevin's "projects" approach, but tonight, I changed my long-static startup.m file to incorporate Michelle's "Last Working Directory (LWD)" instructions. Michelle's file contains a small HTML document with instructions--and code snippets--detailing how to modify your startup and finish files to automatically resume working in the directory in which you were last working . It's trivially easy to implement, once you know how, and it saves me the "trouble" of having to manually click to resume my last session.
Also, I'm embarassed to say that, though I've used MATLAB (and 'startup') for nearly 20 years, I never even realized we have a 'finish' file to accompany startup.
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。