MATLAB Simulink Model Configuration Parameters: Empty Window - matlab

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.

Related

MATLAB GUI Stuck After Save Tool from Guide

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.

Unable to change GUI size in MATLAB's GUIDE interface

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.

Current folder window not accessible in Matlab

I installed Matlab and set the path. After that, only the command window, the command history and the workspace windows were visible. I couldn't find the current folder window anywhere (it did not even appear in the desktop tab). After typing in the command window "filebrowser" an error appears. Suddenly, I get the current folder window but it is not accessibe or there is an error as It doesn't show any of the files and folders on it.
I attach a picture of the Matlab screenshot where you can see the error displayed in the command window and how the current folder window appears.
Any help? What is the problem? How can solve this problem?
Any help is much appreaciated.
Thanks in advance
Consider increasing heap space. The reason for the error is because Java doesn't have enough memory. The error message is however very generic and could be particular to your workflow, but with the command history in the picture, I do not see a problem. Do follow the technical support solution for increasing heap space - http://www.mathworks.com/support/solutions/en/data/1-18I2C/

How to start Matlab profiler

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?

Why does file have to be saved prior to running?

In MATLAB, why does the file have to be saved prior to running ?
I often try quick snippets of code, which I could also easily run also on the Command Window line by line. So, why when I run them through the editor, I have to save them first ?
Can this behaviour be changed, maybe ?
You can use cell mode in the editor placing %% before your code. See also Cell menu in the editor. Once you create cells, you can run them one by one pressing Ctrl-Enter. You don't need to save the file. However you cannot use editor's debugging features (breakpoints, etc).
Video tutorial
my guess would be that when you run your program, the matlab interpreter run it from the disk and not from the IDE buffer. so if you don't save the file it wouldn't run the correct code.