HS searches the command history file for entries containing a specific pattern using the regular expression engine.
the results are displayed in the command window in the format:
#entry location: line
clicking the -location- will open the history file at this line;
clicking the -line- will copy/paste the line to the command prompt and may be return by an [ENTER] command.
>> help hs
for more explanations for this snippet
us (2020). hs: a pedestrian history search engine (https://www.mathworks.com/matlabcentral/fileexchange/20610-hs-a-pedestrian-history-search-engine), MATLAB Central File Exchange. Retrieved .
This is great! Thanks for the submission. One small fix for this to work on Mac:
Change the function GREP_copypaste (line 1168) to
modifier = KeyEvent.VK_META;
modifier = KeyEvent.VK_CONTROL;
Works as expected. Great tool! I believe it should be part of Matlab. Thanks a lot!
I downloaded the file and unzipped it into directory in matlab path. Tried to restart matlab. This error always pops up. I can see grep function nested in hs.m and I can see this line at the end. But I don't have grep.m ('which grep' returns 'not found'.) Looks like I need it but hs documentation does not say it.
yuri, i do not understand this error - GREP is embedded into HS...
you should see this line at the end (-2 two lines)
%$SSC_INSERT_END 29-Aug-2008/17:29:29 F:/usr/matlab/unix/grep.m
can you give more information...
When clicking on a line I get error:
??? Undefined function or method 'grep' for input arguments of type 'double'. Matlab 2008a.
It does what it claims to do, and does so well.
I would remove all history entries coming from hs itself. there are not very useful.
dear WS - because at work (a hospital), i'm living behind two(!) firewalls, which wont let me upload anything else than a zip attachment...
sorry for the inconvenience
Why do you put a single m-file in a zip-file? Yet, great tool!
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!