Matlab - What does an array definition mean

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
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.