Matlab - What does an array definition mean

AI Thread Summary
The discussion centers on creating a MATLAB plot with dual y-axes for temperature and air flow rate data. The user initially struggled with the plotyy function but found a solution that involved using handles to customize the plot's appearance. The handles [AX, H1, H2] allow for direct control over the properties of the plot objects, and users can assign any names to these handles. The user expresses satisfaction with the final plot's appearance and plans to further explore the concept of handles in MATLAB. Overall, the thread highlights the importance of understanding plot handles for effective data visualization in MATLAB.
luitzen
Messages
47
Reaction score
0
I'm trying to make a MATLAB plot with two types of data, i.e. temperature and air flow rate. Since the temperature and air flow rate are on different scales I wanted two y-scales and since there are quite some data sets, I wanted to make the two air flow rates bold.

I tried this, but it doesn't work:

plotyy(time,reator_temperature_matrix,time,air_flow_matrix,'LineWidth',2)

After a long journey, I ended up here: http://www.mathworks.com/matlabcentral/newsreader/view_thread/81078

And saw it solved the following way:

[AX,H1,H2] = plotyy(time,reactor_temperature_matrix,time,air_flow_matrix) ;
set(H2,'LineWidth',2)

This solved my problem, though now I'm curious what [AX,H1,H2] means and I couldn't find it anywhere on the internet. What does '[AX,H1,H2] = ...' create? Can I choose any name for AX, H1 and H2?

When I go to the workspace, I see three vectors with some numbers, but they don't make any sense to me.
 
Physics news on Phys.org
Thank you very much. When I have time I'll will try to read up on handles. My plots now look exactly the way I want them to look.
 

Similar threads

Replies
5
Views
1K
Replies
1
Views
5K
Replies
6
Views
22K
Replies
8
Views
9K
Replies
45
Views
5K
Replies
2
Views
4K
Back
Top