Comments on: Finding items in the History or Current Directory browser https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/?s_tid=feedtopost News from the intersection of MATLAB, Community, and the web. Fri, 19 Nov 2010 11:01:17 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Ljubomir Josifovski https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7458 Fri, 19 Nov 2010 11:01:17 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7458 Thanks for the finish.m tip, most helpful. Yes, I can imagine *The* Deskop was not designed with muliple Matlabs open in mind. :-) Ljubomir

]]>
By: Mike https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7456 Wed, 17 Nov 2010 18:20:30 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7456 Ljubomir,

That is correct. When MATLAB exits, it overwrites the history (also the desktop layout, and many other things). The Desktop isn’t really designed to be in an environment with multiple MATLABs open at the same time. It’s not a trivial problem to solve as the histories are sensitive to order and session. You can probably write your own finish.m file to save a backup or merge histories that works with your platform.

Honestly, it’s not a problem we’re likely to spend time resolving, as we don’t get a lot of requests for it. If you want to make an official request, use our online tech support form. They may even help you with a finish.m script.

]]>
By: Ljubomir Josifovski https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7455 Wed, 17 Nov 2010 11:05:29 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-7455 Somewhat related, when multiple instances of Matlab open at the same time: my impression is that Maltab loads the history.m file on open and then writes new version on close, destroying the existing history.m. When multiple instances are open only the history of last closed instance seem to survive, histories of the rest are lost. If this is true (maybe I am mistaken of how the feature works), then would be of some help if the previous version of the file are saved under backup names, or even better if the history file is always appended to and never overwritten (maybe the limited in-memory size will then become an issue?). I assume asking for a history merge would be asking too much. :-) Thanks for your help, Ljubomir

]]>
By: Mike https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-6934 Tue, 23 Mar 2010 12:08:58 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-6934 @Yair,

thanks for the suggestion. I’ll see what we can do…

]]>
By: Yair Altman https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-6931 Mon, 22 Mar 2010 19:41:48 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-6931 Mike – the command history is a very powerful tool. I constantly use it in the Command Window (with the arrow keys) to modify and re-invoke past commands, for example – with modified input parameters.

Unfortunately, the history file is limited to only 20-30KB of data. For me, this translates into just several hundred commands, only a few days’ worth – hardly enough.

Since disk space and memory are a non-issue nowadays, it would be most convenient if this limit was significantly increased or better still – become a configurable preference.

Thanks,
Yair

p.s. – I know there is a FEX utility that bypasses this problem (https://www.mathworks.com/matlabcentral/fileexchange/9291-save-entire-command-history) but I was looking for a more built-in solution.

]]>
By: Tony B https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-67 Thu, 26 Apr 2007 18:52:55 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-67 Thanks very much for your reply. I could definitely save these commands somewhere else like the shortcut bar, but I find that using the technique of typing a few letters and then up-arrow is much faster and more convenient than moving to the mouse and clicking somewhere else.

Most of the time this works fine, because I use these commands often enough that they are generally available in the command history. However, since the history file is finite, they sometimes cycle out and are unavailable for the up-arrow trick. So what I would like is to ensure that these few “greatest hits” always appear in the command history, so that they are always available for the up-arrow trick.

Thanks again!
Tony

ps. If you get really excited about this, you can look at the technical support discussion where I eventually requested a new feature; the thread id from that email was 1-3JJ17N. They provided a script that attempted to accomplish this objective, but didn’t work for me.

]]>
By: Kristin https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-66 Thu, 26 Apr 2007 13:19:51 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-66 I would suggest selecting the commands and dragging them up the shortcuts toolbar so that they are saved and readily available. You can also select them and use the context menu to put them into a new M-file.

As for your suggestion, are you looking to save out a history file and the reopen it? Or, for a section of the history that had “saved” commands?

]]>
By: Tony B https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-65 Thu, 26 Apr 2007 13:13:52 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-65 I submitted this as a feature request a few months ago, but I thought I’d mention it here as well, since it is somewhat related. I have a set of commands that I run frequently, and I generally access them by typing the first few letters and then hitting up-arrow in the command window. An example of this type of command would be opening a database connection:
databaseConn = database(‘DatabaseName’, ”, ”);
which is both frequently used and typed in exactly the same way every time.

However, sometimes if I spend a lot of time doing something else in matlab, or have more than one open for some reason, these “greatest hits” commands will cycle out of the command history buffer and I will have to type them in again in full. It would be nice if I could save these greatest hits to a separate file, and then matlab would make sure they were always available in the command history.

Thanks,
Tony

]]>
By: Eric Sampson https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-49 Mon, 16 Apr 2007 15:11:28 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-49 In addition to what Kristin mentioned, there is also the feature that you can use ‘*’ as a wildcard character at the start and middle of your word searches:

*ure %matches figure
f*re %also matches figure

Cheers,
Eric Sampson

]]>
By: B. Roossien https://blogs.mathworks.com/community/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-47 Mon, 16 Apr 2007 07:09:57 +0000 https://blogs.mathworks.com/desktop/2007/04/13/finding-items-in-the-history-or-current-directory-browser/#comment-47 Another very usefull tip I can use. Keep them coming!

]]>