disp('Projectile in 3d with air resistance') pause clear; disp('Initial velocity') v10 = 000 v20 = 500 v30 = 500 pause rescoef = .01 wind1 = 5 wind2 = -10 pause disp('Compute the coordinates for given times') pause t = 0:.1:30; x1 = (v10 - wind1)/rescoef*(-exp(-rescoef*t) +1) + wind1*t; x2 = (v20 - wind2)/rescoef*(-exp(-rescoef*t) +1) + wind2*t; x3 = (v30 + 32/rescoef)/rescoef*(-exp(-rescoef*t) +1) + -32/rescoef*t; disp('Plot the position in 3d') plot3(x1,x2,x3)