How to obtain larger output window in MATLAB? - matlab

I have made a gui in MATLAB wherein I need the window to be fullscreen directly after I run the application. However, this does not happen so, and instead, a smaller window is generated, and as a result, the TABs that I have designed, look out of shape...
http://i42.tinypic.com/iogjfo.jpg
Suggest options as to what could be done in the code to get it to fullscreen like this:
http://i41.tinypic.com/2ufvpf6.jpg

Mathworks has provided some function for doing this: http://www.mathworks.co.uk/support/solutions/en/data/1-3MY8PN/index.html?solution=1-3MY8PN
You can resize the window to make it the size of the screen (though the window will not be "maximized"), without having to download extra files: http://www.mathworks.co.uk/support/solutions/en/data/1-4TEZ9X/index.html?product=SL&solution=1-4TEZ9X
There are lots of matlab examples online, so searching is highly recommended.

Related

How to design the icon of a Modelica component?

Is there any software that allows designing the icon of a Modelica component, and then copy into Dymola?
It is hard to draw the picture in Dymola.
A short summary of the answers, there is 4 software support this task:
OMEdit;
MoVE;
InkSpace;
PowerPoint;
Yes, there is MoVE, but it seems development is stopped.
For some tasks OMEdit is better. Properties of graphical elements are nicely presented in a single dialog and you can easily edit the points of lines and polygons.
As an alternative you can use svg and png files, which can be nicely drawn with Inkscape.
Another option for creating icons and info-graphics is to make them in standard packages for drawing, save them in a proper format (e.g., .png) and then use them. This is what I do with my library.
One way I have done it is with powerpoint and wrote a macro that auto-names them: https://github.com/ORNL-Modelica/TRANSFORM-Library/blob/master/TRANSFORM/Resources/Images/Icons.pptm
Next to that is another one for info slides.
Another one worth a go is something like Inkscape (https://inkscape.org/) and then you can run a command line terminal to loop through them all and generate png/jpgs.
The following platform-independent method, i.e. works with arbitrary Modelica simulation environments, is particularly useful for sophisticated icons:
Use LibreOffice Draw for drawing an Icon
For each drawing, produce an image file in one of the desired format according to quality requirements
Include the image file within standard annotation for icons
Here is an example from the library GenKinetics:
An Icon draw in *.gif format: Inhibition Icon
A component employing the Icon: Port_I.mo

Is there a way to use the display preview option in the display block to display the output of wired connections in EV3?

I'm trying to see if there's a way to use the display block in EV3 as a basic print function. I'm working from home and don't have a brick to test the code with so was hoping to just use the display preview option to output variables but I haven't been able to find a way. It will only show the standard 'Wired_1FAC2752-7229-46'. I've tried putting a wait block after it, putting it in a loop and clearing the display first but the preview never displays anything.
Thanks in advance
What about trying a "virtual" brick to run your programm?
Have a look at the "Virtual Robotics Toolkit": https://www.virtualroboticstoolkit.com/
It's not perfect and its not free but maybe a good workaround if you don't have any hardware at Home.

Weston : Customize composition to duplicate window display

I want to be able to duplicate a window at the compositor/window manager level.
That is, when the user open a weston-terminal, I want to display it as 2 windows, and be able to apply movement/rotation to those windows.
To emphasize, I don't want to have 2 weston-terminal open, I really need to duplicate the window's content on screen.
Is that possible with weston and where should I look in the code?
I already compiled it and learned to rotate/move windows using weston-shell.c but don't know where to look after.
This isn't possible with the Weston implementation, in the manner you've described. You'd have to hack your own Weston implementation to do this, such that one client can bind to multiple surfaces.
An alternative to consider is to have a surface and subsurface, and have you client render to both the main surface and the subsurface.

How to know when a Gtk Window is fully shown?

I'd like to know which signal is emitted when a Gtk.Window is fully shown, with fully shown I mean the window itself is shown and its widgets too.
I tried several signals:
show
realize
visibility-notify-event
set_focus
but none of them works properly.
The only interesting answer I found on the web is this.
Connect a callback after the GtkWidget::draw signal (previously called expose in GTK+2).
Addendum
There is other stuff that comes into play: double buffering, client-side windows and (why not?) the fact that a widget can defer its drawing in an idle callback.
If you want to know when your main window appears the first time, it is far easier (and saner) add a g_idle_add after your show_all call.
It should be:
window.get_property("visible")
#Returns true if the window is visible

C, GTK: window stops updating

I'm developing an application that periodically draws images on a GTK Drawing Area inside a window.
The rendering first works well and the window content gets repainted if I drag another window over the drawing one, but after some random amount of time (some seconds), the window stops updating itself.
New images dont get displayed, and if I then drag another window over the rendering one I get this:
When I click one of the checkboxes below my drawing area, the window gets refreshed and the problem is gone for another few seconds.
Any idea what could make the GTK threads stop updating the window content?
I dont know which part of my code is of interest to answer that question, so I pasted the mostly full version here.
My GTK-main() is called like this:
void window_main()
{
pthread_create(&drawing_thread, NULL, img_draw, NULL);
gtk_main();
gdk_threads_leave();
}
Thanks for any hints! :)
Found the solution: in the original example code I used (here) they use a g_timeout_add() to register their periodic drawing function.
The g_timeout_add()-registered function is run by gtk_main(), which means it is protected internally by gdk_threads_enter() and gdk_threads_leave(). That's the point I was not aware of.
Surrounded my call to gtk_widget_queue_draw_area() with these two functions and the bug is gone 8)