I switched to Matlab 2012b (from 2011a), but fail to find out how to start the profiler gui in the new matlab gui.
The GUI option is still there, in the editor tab:
You will be able to specify input parameters once the function has crashed ;)
AFAIK, this should still work:
profile viewer
while we're at it, these tweaks should still work, too:
profile -memory on
setpref('profiler', 'showJitLines', true);
I don't have the opportunity to check, but you mean to say that R2012 doesn't have the little button on the top anymore?
Related
I am currently working with Simulink and out of the sudden, I am unable to change the Model Configuration Parameters.
Whether I try to open the window via RightClick->Model Configuration Parameters or via Ctrl+E, in both cases, a blank white window opens.
This problem persists after a reboot and opening/closing MATLAB. Furthermore, it is the case for any model (whether old, new, untouched, example...) on my computer. Yesterday I searched for 45min for possible solutions but could not find any.
Is there some graphics cache or can you think of another way, how I could get the dialog back? A photo is attached:
Screenshot: Configuration Parameters window stays blank
Thanks a lot in advance!
This problem happens in Academic version on Simulink. I have not seen it in Original software.
A solution for your problem can be :
1) clear cache of Simulink by typeing the following command in command window :
rehash toolboxcache
2) reset menu and toolbar of Simulink by the following command :
sl_refresh_customizations
Then close MATLAB by exit command.
I have been working on an gui developed using the GUIDE in Matlab. The current gui, I mean the general figure window contains all types of sliders, buttons, editboxes, etc...
After awhile, I added a toolbar to my gui which included the Save tool. I have not changed any specifications regarding the save tool. I used the one already in GUIDE toolbar editor.
After clicking it, my gui program is stuck at that very instance I pressed the save tool and I cannot do anything else with it. It also opens in the same situation even after restarting the PC. I do not get any errors.
I would appreciate any help. How to restore functionality to my gui?
Unfortunately the "Save" tool's default is not "Save As" with a prompt it is just the normal "save" which immediately overwrites. The tool saved your current figure (or GUI). Meaning it overwrote the fig file of your GUI with the current state.
So when you pressed "save" uicontrol visibility, values, slider positions, edit box text etc. all was written into the FIG file. So the next time you launch it is all still in there.
To Fix it you will probably have to edit in GUIDE and try to clear / reset everything to your desired initial state.
I am pretty new to MATLAB GUI. I've attempted to teach it to myself the last few weeks so I can understand and improve some code that is being developed where I work. GUI is still a fairly new concept to me.
I am wondering: I need the command window to output the mean of a set of data according to a function that is called by pressing a button on the GUI. Where would I include this code and how should I go about it?
Thanks
You can debug the code by using 'disp' or 'fprintf' functions. Notice that converts your content to compatible with the function.
For some reason I am unable to resize the workspace size of a GUI figure using MATLAB's built in GUIDE editor. Every time I do so (by dragging the corner of the workspace), I get a warning in MATLAB's console stating:
Warning: Cannot set Position while WindowStyle is 'docked'
> In guidefunc>resizeFigure at 2693
In guidefunc at 116
I have tried setting the default window style to 'normal' (set(0,'DefaultFigureWindowStyle','normal')) to no avail.
I see no reports of this strange behaviour elsewhere online, and wonder if anyone else has experienced this?
Am using MATLAB R2012a. Any thoughts appreciated(!)
Improving upon Lucius' answer, I was able to resize the figure after using the following command on the workspace window.
set(gcf,'WindowStyle','normal')
This command helps sets the window style to normal and hence is resize-able.
I am using Matlab R2020b and the figure under question was selected (highlighted) before I ran this command.
Default-Window-Style and Window-Style are two different things. If you want to change the WindowStyle, you should use that property.
In addition take care for the handle of the figure!
%get handle:
myFigure= findobj('Tag','SomeUniqueTagHere') %make sure to get the right one
set(myFigure,'WindowStyle','normal')
I guess (but I'm not absolutely sure) default-properties will just be used during creation.
You can resize the workspace in GUI and therefore avoid the error message
Warning: Cannot set Position while WindowStyle is 'docked'
by changing the setting WindowStyle in the GUI. To the end you should:
Go to the GUI
Double click on the background, which makes appear the inspector panel.
Go to the property WindowStyle and change it from docked to normal.
After that you can resize your workspace normally.
When I run guide in Matlab, the window that opens is completely grayed out with a title "GUIDE quick start". I am running R2012b in Ubuntu 12.04.2 LTS. Has anyone else run into this problem?
UPDATE 1
So I just discovered that if I press enter on that first blank grey window then it opens the Layout Editor window and everything seems to be fine. So I am guessing that on that first screen there is just an OK button (which I cannot see) so when I press enter it is like clicking on the OK button.
UPDATE 2
I built a quick GUI and there are issues. I can create axes and buttons and sliders on the layout tool. However, when I run the GUI tool it only displays the axes, the buttons, sliders are not there.
I believe some things in MATLAB are not yet compatible with Java 7, so stick with Java 6 for the moment.
In any case, you can have both versions installed at the same time, just instruct MATLAB to use the correct version by setting the $MATLAB_JAVA environment variable.
You can then verify which version is being used by issuing the command:
>> version -java
I had a similar problem in Ubuntu, got solved by skipping Unity and starting the session with "classic gnome" instead.