A list,

The calculation method of range of oblique projectile on slope is explained, the relationship between maximum range and slope is calculated, and the relationship between range and slope is discussed in detail. The relationship between range and Angle of fire, maximum range and slope is shown in pictures.

Ii. Source code

% Range of oblique projectiles clear % Clears variable A1 =- 45; % Minimum slope alpha= A1:15:45; % Slope elevation a=alpha* PI /180; % to radians n=length(a); The number of % slopes, Theta = A1:5:90; % Th =theta* PI /180; [A,TH]= meshGrid (A,TH); % elevation and incidence matrix S=2*sin(TH-A).*cos(TH)./cos(A).^2; % Range matrix (in horizontal maximum range) S(S<0)=nan; % range less than zero makes no sense (non-number) figure % Create graph window %plot(theta,S,'LineWidth'.2Plot (theta,S(:,1),'o-',theta,S(:,2),'d-',theta,S(:,3),'s-'. theta,S(:,4),'p-',theta,S(:,5),'h-',theta,S(:,6),'< -. theta,S(:,7),> '-'Grid on % h=legend([repmat()'slope:,n,1),num2str(alpha'),repmat('\circ',n,1)]); % Insert slope legend fs=16; % font sizeset(h,'FontSize',fs2 -) % enlarge legend THM =45+alpha/2; % Maximum range Angle of fire sm=1./ (1+sin(a)); % Maximum range text(THM,sm,num2str(sm'.3),'FontSize',fs)% mark maximum range (reserved3A) th0 = a1 * ones (1,n); % Maximum range horizontal line starting abscissa hold on % holds the imageCopy the code

3. Operation results

Fourth, note

Version: 2014a complete code or write plus 1564658423