MATLAB: I need help on how to plot the max y peak on two different lines on one plot

y peak plotting

thank you for any help in adavnce.
``% This program computes three projectiles motion, velocity, and accleration of a sphere with and without%air resistanceclear;close all;clc%% Sphere soccer ball rad =  0.037;   % sphere radiusmass = 0.147;  % mass spherekg    Cd = 0.47;     % Drag coefficientAf = pi*rad^2;  % cross section area sphere%% air density Gravitiyrho = 1.2;   % air densityg = 9.81;     % gravitational acceleration  %% Initial condition: position and velocityyo = 2;     % initial positionV1 = 15;      % initial velocityxo = 0;       %intial position  d=45 ;           %degreesstheta = d*pi/180; %% Time vector and time stepdt = 0.1;    % time stept = 0:dt:10;  % time vectorimax = length(t);%% Velocity and position no dragacc1 = -g;               % acceleration with no dragx = V1*t*cos(theta); % position no dragy = V1*t*sin(theta)- 0.5*g*t.^2;                                             vx  = V1 * cos(theta); % velocity no dragvy = V1 * sin(theta)-0.5*g*t.^2;V1 = sqrt(vx^2 +vy.^2);%% terminal velocity with dragVter = sqrt(mass*g/(0.5*Cd*rho*Af));  %% Acceleration velocity and position with drag%% Pre setaccx2 = zeros(size(t)); % initialize acceleration with dragaccy2 = zeros(size(t));Fdx = zeros(size(t));   % initialize force with dragFdy = zeros(size(t));Vx2 = zeros(size(t));   % initialize velocity with dragVy2 = zeros(size(t));V2  = zeros(size(t));y2 = zeros(size(t));   % initialize position with dragx2 = zeros(size(t));% Initialize previous stateyprv = y;  % initialize previous position (initial condition)xprv = x;Vxprv = vx;  % initialize previous velocity (initial condition)Vyprv = vy;%%  loop drag force, acceleration, velocity and positionfor i=1:imax      Fdx(i) = 0.5.*Cd.*rho.*Af.*Vxprv.^2;    % Drag force      Fdy(i) = 0.5.*Cd.*rho.*Af.*Vyprv(i).^2;    accx2(i) = -Fdx(i)/mass*V2(i).*Vx2(i) ;        % Acceleration                           accy2(i) =-g - Fdy(i)/mass*V2(i).*Vy2(i) ;                                                   V2(i)=sqrt(Vx2(i).^2+Vy2(i).^2);        Vx2(i) = Vxprv + accx2(i)*dt;       % Velocity     Vy2(i) = Vyprv(i) + accy2(i)*dt;        x2(i) = xprv(i) + Vx2(i)*dt+0.5*accx2(i)*dt.^2;    y2(i) = yprv(i) + Vy2(i)*dt+0.5*accy2(i)*dt.^2;         % Position      yprv(i) = y2(i);                   % Update previous position     xprv(i) = x2(i);    Vxprv = V2(i);                   % Update previous velocity    Vyprv(i) = V2(i);end    %% drag no drag    figure(1)    plot(x,y,'b:'), hold on    plot(x2,y2,'g'),``

• ``[maxy, maxyidx] = max(y);[maxy2, maxy2idx] = max(y2);plot(x(maxyidx), maxy, 'b^');plot(x2(maxy2idx), maxy2, 'g^');``