how can i graph two graphs on one axes in GUI matlab
1 view (last 30 days)
Show older comments
So i need to graph a freeway(basically a line that starts from (0 15) and end at (20 15)) and then theres a break in the graph from (20 15) to (35 15) and then graphing another line from (35 15) to (80 15). Attached is my hw assignment.thanks
0 Comments
Answers (1)
Image Analyst
on 16 Mar 2018
To plot 2 graphs in one axes, assuming your have two sets of (x,y) coordinates you want to plot, try this:
plot(x1, y1, 'b-');
hold on;
plot(x2, y2, 'r-');
grid on;
See Also
Categories
Find more on 2-D and 3-D Plots 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!