clear, clc, close all
%These are the solutions to assignment 6

%initializations
X = sort(rand(1,50)*100,'descend');
Y = X.^2; %This is where you use the dot operator.
Y2 = X.^3;
Y3 = X.^4;

%Statement/Declarations
figure(1)
plot(X,Y)
xlabel('\alpha'), ylabel('X^2'), title("\it{These are words}")
grid on, grid minor
hold on
plot(X,Y2)
legend('Y','Y2')

figure(2)
plot(X,Y3)
xlabel('\alpha'), ylabel('X^2'), title("\it{These are words}")
grid on, grid minor

%Part 2
figure(3)
subplot(1,3,1)
plot(X,Y)
hold on
plot(X,Y2)
xlabel('\alpha'), ylabel('X^2'), title("\it{These are words}")
grid on, grid minor, legend('Y','Y2')
subplot(1,3,2)
plot(X,Y2)
xlabel('\alpha'), ylabel('X^2'), title("\it{These are words}")
grid on, grid minor
subplot(1,3,3)
plot(X,Y3)
xlabel('\alpha'), ylabel('X^2'), title("\it{These are words}")
grid on, grid minor