I don't know why my code is displaying weird, but here it is in this comment.
clc, clear, close all
% OPEN LOOP
num = {1};
den = {[1 7 10 0]};
Gs = tf(num,den)
output = step(Gs);
figure(1)
stepplot(Gs)
% CLOSED LOOP
for k = [1 10 30 50] % Values from question 3
num1 = {k};
den1 = {[1 7 10 k]};
Gcl = tf(num1,den1)
output1 = step(Gcl);
INFO = stepinfo(Gcl)
figure(2)
stepplot(Gcl)
hold on
end
legend('K=1','K=10','K=30','K=50');
fprintf(1, 'K=1 K=10 K=30 K=50')
fprintf(1, 'DATA', INFO')