clear all;
clc;
close all;
x = 1:5;
for j = 1:3
y = j*x.^2;
h(j) = plot(x,y);
hold on
end
legend(h([1,2,3]),'y1','y2','y3','Location','northwest')
clear all;
clc;
close all;
x = 1:5;
for j = 1:3
y = j*x.^2;
h(j) = plot(x,y);
hold on
end
legend(h([1,2,3]),'y1','y2','y3','Location','northwest')