Guide – run multiple commands simultaneously

4 ビュー (過去 30 日間)
Matthew 2012 年 5 月 21 日
I’m still new to GUIDE and have been toying around with it for some time. I’ve looked through and understand a fair amount of what Matt posted and seen the majority of videos from Doug from his GUIDE blog posts ( My end goal for learning GUIDE is to feed simulated data into my GUI and have it respond graphically. For learning purposes, I’m starting off trying to learn simple things and build my way up to the end goal. My current goal is to have a "fuel tank" deplete over time while another "tank" heats up simultaneously. Both these “tanks” are just going to be square axes.
For the fuel tank depleting, I thought I could get two axes of different colors - one representing fuel while the other represents emptiness. The “empty" axis would be growing longer, so it would appear that the “fuel” axis would be depleting.
As for the heating up tank, I can use the fill command to change its color over time, which I can already do.
I would like to be able to show both at the same time. Can someone please point me in the right direction?
  2 件のコメント
Matthew 2012 年 5 月 22 日
after seeing the rectangle() command, i believe working in handles graphics would be much easier than creating bar graphs.



Walter Roberson
Walter Roberson 2012 年 5 月 21 日
An axes is a portion of a screen within which you can put graphics. You would not often want to change the size of your axes as the program runs, but you might change the size of something you have drawn in the axes.
I suggest you consider using a single axes, and two rectangle() commands that represent the outside of the fuel tanks, and two filled rectangle() commands that represent the volume or heat.
It is not possible to run multiple MATLAB graphics command simultaneously. Even if you had the Parallel Computing Toolbox, or were to spawn additional Java processes, all MATLAB graphics is forced to go through one single thread in order to prevent inconsistencies in the graphic structures. Instead, update the graphic objects sequentially. MATLAB only updates the screen under limited circumstances, so even though the instructions might be given sequentially, the combined result of the instructions is most likely what will show up on the screen on the next screen update.
  5 件のコメント
Matthew 2012 年 5 月 22 日
I figured I'd need to use a lot of tiny rectangles to create the gradiant I'm looking for, then slightly change each rectangle's color.
As for the "custom graphics" I was asking about in the last thread, I am going to use patch() and create my own "tanks". It doesnt look that hard.
I think I have all the questions I need answered for the moment. Thanks Walter and Sean for the help!


その他の回答 (0 件)


Find more on Migrate GUIDE Apps in Help Center and File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by