How to clear comand history from command window?

  • Permalink
  • submit to reddit
  • Email
  • Follow


Is there a command like clc(for screen of command window) and clear all(for variables) to write in command window so that he clears automatically my command history?


I know in menu edit i can clear but i'm interested if there is a command window (command) to clear my history commands in matlab.

Thank you!
0
Reply mihaispr (1095) 3/27/2009 11:13:01 AM

See related articles to this posting


"Sprinceana " <mihaispr@yahoo.com> wrote in message <gqicbt$dmd$1@fred.mathworks.com>...
> Is there a command like clc(for screen of command window) and clear all(for variables) to write in command window so that he clears automatically my command history?
> 
> 
> I know in menu edit i can clear but i'm interested if there is a command window (command) to clear my history commands in matlab.
> 
> Thank you!


com.mathworks.mlservices.MLCommandHistoryServices.removeAll

Yair Altman
http://UndocumentedMatlab.com 
 
0
Reply altmanyDEL (1141) 3/27/2009 11:55:03 AM

"Yair Altman" wrote in message <gqieqn$od4$1@fred.mathworks.com>...
> "Sprinceana " <mihaispr@yahoo.com> wrote in message 
Hi,
I guess below command would full fill your requirement.
com.mathworks.mlservices.MLCommandHistoryServices.removeAll

regards,
Harish
0
Reply harishli2020 (2) 2/21/2013 10:48:06 AM
comp.soft-sys.matlab 203790 articles. 537 followers. Post

2 Replies
333 Views

Similar Articles

[PageSpeed] 5


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

using DM commands to clear results window when ODS commands put
Below the ==== is a SAS program structure that I use for most programs. I use DM or Display Manager commands to do a lot of things that I, in my everyday work flow, cannot always be trusted to do. Most of the DM commands below are commented for those who don't use them and, after seeing the "magic" decide to try it out. The purpose of this post, however, is to touch on one problem I have with these commands when I am also using ODS statements to create RTF output. In the program below I have commented out the ODS lines. As the program is now, when you run the code...

Re: using DM commands to clear results window when ODS commands
Kevin, I think that the command(s) you are looking for can be found in the thread at: http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0310c&L=sas-l&P=35375 HTH, Art --------- On Dec 3, 3:29 pm, Kevin.F.Spr...@DARTMOUTH.EDU ("Kevin F. Spratt") wrote: > Below the ==== is a SAS program structure that I use for most programs. > > I use DM or Display Manager commands to do a lot of things that I, in > my everyday work flow, cannot always be trusted to do. > > Most of the DM commands below are commented for those who don't use > them and, ...

clear command window
Simple problem: How can I clear the command window before I start a routine? Best regards Try, >> help home Also, you probably know about this one already, but try, >> help clear daniel ennis wrote: > > > Try, > >>> help home > > Also, you probably know about this one already, but try, > >>> help clear OR >> help clc HOME preserves past commands so you can scroll up, CLC clears the scroll bar. Lex <laux5101@gmx.net> writes: > Simple problem: > > How can I clear the command window before I start a routine? cl...

Why does "History and Command Window" dock figures & Help window?
In Matlab 2013a, under the Layout menu, I chose "History and Command Window= ". It docks everything, including figures and the Help window. Very distra= cting and very disruptive. My question is why the menu item is interprette= d in this way, and also how to *really* pull up the history window at will = alongside the command window without messing with any other window. And wi= thout diving into preferences or somesuch. Thanks. ...

command window history
How to increase the size of the command window history? Or at all how to remove this limit, so the command window history will be unlimited? Thanks ...

No Command history for R11 in windows
I am using R11 in windows xp and the command history is non-existent. I put a file called history.m in the prefdir directory but this didn't work. Is there no command history in R11? Jeramy Ashlock: <SNIP Is there no command history in R11... not in the r12+ sense; you'll have to use up-/down-arrows (if i remember correctly) us ps: be happy your r11 runs under xp at all! us wrote: > > > Jeramy Ashlock: > <SNIP Is there no command history in R11... > > not in the r12+ sense; you'll have to use up-/down-arrows (if i > remember correctly) > > us...

How to clear history of commands in unix
Hi users, I would like to clear the history of commands I typed in the shell. I did some research and concluded that the history of commands are in the .sh_history file. So I removed the file .sh_history. But still when I type h, i see a history of commands. Could anyone tell me what to do to clear the history of commands. Second question is how can I find out which unix shell I am working on? Thanks astrorail 2004-09-8, 09:10(-07), astrorail: > I would like to clear the history of commands I typed in the shell. I > did some research and concluded that the history of commands are i...

Automatic arrangement of figure and command windows and command window with respect to each other
Dear all, I try to do something like putting a figure window in the top left corner of the screen, the command window in the top right corner and an other figure along the bottom side. What I know is: - how to place the figures at the right place with the right size. What I don't know is: - How to get the height of the menu of the figures (it changes with screen resolution and it would be great if I didn't had to manualy adjust my code dependent on the computer I'm working on) - How to control the command window position and size to move it where it should be and move it ...

How to make a shortcut to clear all command histories
com.mathworks.ide.cmdline.CommandHistory.deleteAllHistoryForDesktop; this one does not work with matlab 7.0.1 R14 SP1 Just to be clear, the command that you are using to clear the history is undocumented and not guaranteed to work for other releases. But, I did have our support group update the SWAT for this to show how to do this in R14: http://www.mathworks.com/support/solutions/data/1-1BM76.html?solution=1-1BM76 We hope to provide an m-interface to allow you to do this in a future release. Out of curiosity, why do you want to clear the history contents? Kristin ----------------...

Re: How to clear history of commands in unix
Hi stephane, my shell is tcsh. i restarted the shell but the h command still shows the history commands. May be I am not deleting the proper history file. I have deleted the .sh_history file. exec "$0" returns with a message -tcsh: Command not found. help, astrorail astrorail <srinee@gmail.com> wrote: > exec "$0" returns with a message > -tcsh: Command not found. grep $LOGNAME /etc/passwd|awk -F: '{ print $7 }' This will tell you how to invoke your shell. > my shell is tcsh. > i restarted the shell but the h command still shows the histor...

Entering a Hebrew character in command window disables hyperlink highlighting in command window
Hi, When I accidently enter a Hebrew character in the Matlab command window, there is a short (1-2 sec) pause, and then the font changes slightly and all highlighting is gone (red for errors, etc.). I can still click the links, but cannot see them. This is much better than the situation a couple of version ago (http://www.mathworks.com/matlabcentral/newsreader/view_thread/135201#341828, http://www.mathworks.com/matlabcentral/newsreader/view_thread/143120#360213) when Matlab was stuck, but still... Omri ...

The clear command does not work for graphs window
Hi there, I need to clear all the figures in the graph window that I created. But the clear command which ususally works well for the output window failed to do so. Anyone has the idea of that? Thanks! gim Gimmy, Take a look at: http://www.asu.edu/sas/tips/graph/clear_graphs.html HTH, Art -------- Gimmy Tang wrote: > Hi there, > I need to clear all the figures in the graph window that I created. But the > clear command which ususally works well for the output window failed to do > so. Anyone has the idea of that? > Thanks! > gim ...

command history behavior in windows and linux
Does someone know if there is a setting in the python Unix world to make the command history behave as it does in the Windows intepreter? Specifically, I like the fact that the command history remembers which of a sequence of commands is the one that I last issued. For example, suppose that I typed the following lines into the interpreter: import foo for e in foo.container: print e In Unix, I would have to tap up arrow 3 times for each line: up up up gives me "import foo". I press enter. up up up gives me "for...". I press enter. up up up gives me " print...&qu...

"clearing command history" ?
Do you know any command for 'clearing command history' (= menu EDIT, CLEAR COMMAND HISTORY)? Thanks. dota wrote: > Do you know any command for 'clearing command history' (= menu EDIT, > CLEAR COMMAND HISTORY)? Thanks. There's no command to perform a task equivalent to the "Delete Entire History" item on the Command History's context menu. However, note that the command history is stored in a file, history.m, in your MATLAB preferences directory. Removing this file while MATLAB is running won't clear the history (MATLAB should just rewrite it wh...

clear previous line in command window
Hello, is there any way to clear only the previous line in the command window? Thanks, Tobias Waumans ...

clear previous line of Command Window
Hi all, i'm printing a computational percentage in each step pf an iteration. So at each iteration I know the status of the computation. I'm doing this using the disp.m function. Now, the question is: is there a way to clear, at each iteration, the previous line in the command window, so that the new status percentage replaces the old percentage, without printing it each time in a new line? thanks to all Daniel Daniel C.: <SNIP command line eraser... one of the solutions <http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=1436&objectType=FILE>...

Shell command history (Windows XP)
Hi I would like to be able to use the up/down arrow keys to scroll through previous history of my shell commands. Is this possible? (Presently the up key just moves the cursor up the page) Best Regards >>>>> pflancer <pflancer@googlemail.com> writes: pflancer> I would like to be able to use the up/down arrow keys to scroll pflancer> through previous history of my shell commands. Is this possible? pflancer> (Presently the up key just moves the cursor up the page) Binding the up and down key to the same command as M-p and M-n might do the trick (...

Windows command window
I am making some calls to some DOS commands using "x" but how do I stop the Window from opening up? On Feb 22, 1:33 pm, "RolandRB" <rolandbe...@hotmail.com> wrote: > I am making some calls to some DOS commands using "x" but how do I > stop the Window from opening up? I think you would be much happier using SYSTASK. Much more control than X. systask command 'dir /s /b /a-d ".\abc" >abc.dat'; This example does not cause a dos box to open. Bad example however, for this I would use PIPE but you already know that. On 22 Feb, 19...

Commands in Editor and in Command window
Hi. I find a strange problem. When I write: mod=fix(date_start+(13*dt/86400)) in the command window, the result is 730030 (that is the right result) When I write the same command in the text editor and then I run the code, the result is 730031 (a wrong result). Why??? date_start and dt is the same, I write just the same command, but the result is different. Why? Thanks a lot, Stefano. ...

abort command in command window
i keep doing something that puts me in this state where the command window keeps expecting more text at the cursor and won't execute even if i return down to the next line. the text to the r ight of the matlab start button says Continue entering statement. how do i get out of this mode? thanks. m smv wrote: > i keep doing something that puts me in this state where the command > window keeps expecting more text at the cursor and won't execute even > if i return down to the next line. the text to the r ight of the > matlab start button says Continue entering statement. how d...

Launch Windows command window....
I'm trying to launch a seperate telnet window from within my python program. The command I thought I was supposed to use is below: os.system("telnet.exe -f C:\Folder\output.txt localhost 6000") This creates a telnet window inside the current window. This is not desirable. I need it to launch a seperate command window for telnet output. Any ideas ? I'm one step closer... subprocess.Popen("telnet.exe -f C:\Folder\output.txt localhost 6000") is improved, but still doesn't launch a SEPERATE window... Ernesto wrote: > subprocess.Popen("telnet.exe ...

Restoring the command window (Windows)
If I'm running a rexx program in a Command Window, and that window has been minimised, is there any way that I can restore the window from within my code? Please note: I'm not trying to steal the focus, just to surface the window. The program (in this case) is monitoring my router, and it alerts me whenever the IP address changes. It emits a "beep" as a warning, but I'd like to restore the window at the same time. If there is nothing in rexx itself, is there any 3rd-party program that would do the job? -- Steve Swift http://www.swiftys.org.uk/swifty.html http://...

Make Command History window wrap text?
Is there such an option? ...

Suppressing Windows command window
I find myself writing a cross platform GUI application, which has to run on Linux, Windows and MacOSX. I've not done any Tck/Tk work on Windows, and have developed the application on Linux. Now I try it on Windows7, using a Tclkit, I hit a bit of a problem. My Tcl opens a multithreaded, native Windows application which sends to stdout and stderr. When I run this application using either 'exec' or a piped 'open' the process starts fine, but it pops up an ugly black command window to show the standard output. I'm not sure if it's Windows which makes this window appea...