Hey guys i was wondering if any of you could help, I'm trying to do a projectile motion simulation where the air resistance proportional to the square of the speed of the projectile. I'm having some serious troubles and was wondering if anyone could help! I will Genuinely pay someone if they help me alot. Thanks

Heres my code for the motion without air resistance
function projectilemotionwithairresistance()

Vx=input('Enter the Horizontal Velocity Component ');
Vy=input('Enter the vertical velocity component ');
% Gets Values for the horizontal and vertical components of the velocity




ind=1;
t=[];
t(ind)=0;
x=[];
y=[];
x(ind)=0;
y(ind)=0;
dt=.01; %Increment of index
g=9.8; % m/s^2
% Test whether ball has hit the ground
% ****x and y position****


while ((y(ind)>0)|(ind==1))
ind=ind+1;
t(ind)=t(ind-1)+dt;
x(ind)=Vx*t(ind);
y(ind)=Vy*t(ind) - .5*g*(t(ind))^2;
end
% Plot Path of Ball
plot(x,y)
title('Path Of Projectile With No Air Resistance')
%axis([0,400,0,80])
xlabel('Distance (Metres)')
ylabel('Height (Metres)')
% Display the max height and distance
fprintf('Max Distance = %-5.1f m\n',max(x));
fprintf('Max Height = %-5.1f m\n',max(y));