Displaying multiple plots in Matlab figures -
I want to draw 2 figures and assign them as suva1.fig
and suva2 I want to save. Respectively figs
. The first figure has 5 identical lines and the second number has four identical lines. The following is my code but I can not get the desired plots. Please edit the code to get the desired result.
all CLC x1 = [1: 1: 50]; Y1 = [1: 1: 50]; X2 = [1: 2: 100]; Y2 = [1: 2: 100]; For I = 1: 2 if the (i == 1) j = 1: 5 h = the shape plot for the shape plot (x1, y1, 'o'), end (h, 'suva1', 'fig) I = = 2) Jammu = 1: 4h = Figure plot (x2, y2, 'o') and service (h, 'suva 2', 'fig) and end
With your code, it does not appear that you are trying to display several plots in a single shape. Besides, I'm not sure why you put loops for (j = 1: 5)
To plot multiple lines on the same plot, use the grip on the command:
h = figure plot (x1, y1, 'o'); Wait; Plot (x2, y2, 'k'); Hold down;
To use subplots:
h = shape; Subplot (2,1,1); Plot (x1, y1, 'o'); Wait; Subplot (2,1,2); Plot (x2, y2, 'k'); Hold down;
To save 2 different plots:
h = shape; Plot (x1, y1, 'o'); Rescue (H, 'Suva 1', 'Fig'); Close (h); H2 = figure; Plot (x2, y2, 'o'); Rescue (H2, 'Suva 2', 'Fig'); Closer (h2);
Comments
Post a Comment