Command Window Output with MATLAB GUI - matlab

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.

Related

The names/symbol of the blocks in Simulink dissapeared ยก

I don't have much experience with simulink but everything was working fine until the symbols inside the blocks (integrator, merge, unary minus...) dissapeared and now it is just a white square (they continue working tho). I haven't modified the format or similar that I can recall.
I have also tried to delete those blocks and import new ones from the library browser but the problem persist.
How can I fix this problem?
PD: I can't upload an image sorry :((
I had a similar problem in the past, I used the next commands in the command window.
restoredefaultpath
rehash toolboxcache
It will take some time, but might work.

MATLAB Simulink Model Configuration Parameters: Empty Window

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.

How can I create a tab in MatLab GUI?

I am sorry for asking the same questions which has been asked before. But the thing is I am not in matlab for a long and especially during trying to build a GUI I am crossing some problems which looks like complicated when l compare which C#.
Now I am using Matlab 7.12.0(R2011a) and I want to know the possibility to add tab in my GUI to make it more clear.
I am appreciate for answers which could give me an idea to figure out.
Thanks.
You can create tabs using uipanels where you toggle the visibility to reproduce the tab like behaviou, there are a few utilisties on the Matlab FEX.
To do this you need to be happy with creating GUI's using code only (no guide).
If you do want an easy interactive way of creating a GUI with tabs then I have my own commercial GUI toolbox that creates very nice tabs.

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?

Create tabs in a matlab GUI

How can I create tabs in matlab gui?
I did something like this a while ago...
I mean I created some menus at top of my GUI and then pressing each menu will set visible property of some controls on and the others get off
that way is useful for small GUIs but in beag GUIs it encounters problems and editing the GUI gets hard
I need someway to create seperate GUIs acting just like Mozilla tabs
Is there anyway to create that?
Tabs aren't officially supported yet, even though there exists the semi-documented function uitab. Note that in 2012a it warns you that the function will change.
However, there is a very nice submission on the File Exchange, the GUI layout toolbox that comes with tab functionality.
Matlab supports tabs from R2014b
See uitabgroup