问题
I have for loop that plots multiple graphs, whereby each graph has own window. I would like to concatenate these graphs using only one graph and x y axis.
Could someone give an example?
回答1:
The following code plots a few points in a single graph. You can place anything you'd like to plot in this plot() function.
x = [1,2,3,4];
y = [5,3,4,6];
figure; % Create a new figure window.
hold on;
for i = 1:length(x)
plot(x(i), y(i), 'r*'); % Plot a red star.
end
来源:https://stackoverflow.com/questions/44721722/how-to-concatinate-multiple-graphs-on-the-same-x-y-axis-in-matlab