is it possible to make command window scroll bar being in position of it self even by runnig a m-file and not going end of wondow?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Is it possible to make command window scroll bar being in position of it self even by running a m-file and not going end of window? I want to control scroll bar of command window manually only for a special and specified m-file
2 Commenti
Risposta accettata
Jan
il 18 Set 2011
You could display the links by using an HTML document shown in the built-in browser, see the WEB command. Inside this browser, hyperlinks like this are evaluated in MATLAB:
<matlab:plot(rand(10)) Plot(rand(10))>
They can be displayed in a nice table also. And most of all: There is not auto-scrolling in the browser. It is simple a good idea to separate the standard output to the command window and the GUI.
[EDITED]: You can try this to create a HTML file, which can be displayed in the browser: FEX: cell2html
cell2html({'<matlab:plot(rand(10)) Plot(rand(10))>'}, 'Test.html');
web('Test.html');
4 Commenti
Più risposte (3)
Fangjun Jiang
il 18 Set 2011
I am not aware a method to control the Command Window scroll bar position through M programming. You could press ctrl-home to quickly go to the top of the command history.
So you could run a clc command, then run your program to display all the hyper-links. A user can press any of the hyper-links to plot a figure or do anything. The Command Window display will move due to the outputs of those plotting. Then the user can press ctrl-home to go back to the original display of all those hyper-links.
The problem is, with so many hyper-links, it's still hard to find the right one. Plus, once the "Number of lines in command window scroll buffer" (default is 5000 but it is configurable) is hit, I don't think you can go back to the original hyper-links anymore.
The point is, using or rely on Command Window display to implement the user interface of your program is not a good idea. You could use uitable(). You could put all the Excel file names in a cell array and use uitable() to display it in a dedicated window. In the callback function of the uitable, you can implement the function that was in your hyper-link to do the plotting or whatever else.
4 Commenti
Fangjun Jiang
il 18 Set 2011
uitable() changed a lot between versions. In R2007b, it is 'undocumented'. You can type doc uitable or check this link for details. http://www.mathworks.com/help/techdoc/ref/uitable.html
Hyper-link won't work anymore. You'll need to set up a callback function. Every time a cell in the table is clicked, the function will be called. In this function, you'll read the content of the cell (the Excel file name) and then load the data and plot. Since you've already have that part done, I don't think you need much coding change.
Image Analyst
il 18 Set 2011
You don't have to scroll all the way up past 40000 lines of output to get to the last typed commands. Just hit the up arrow to get the previous command(s). You can also type a few characters of the prior command and then hit up arrow and it will bring up only those that start with those characters.
4 Commenti
Image Analyst
il 18 Set 2011
Then make a GUI and have your links be in one place, like a listbox or uitable, and send your output to an edit text box where you can scroll around.
Vedere anche
Categorie
Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!