A list,
The application of infinite series is illustrated by the law of flat ball jumping on the ground. Animate the motion trajectory of a particle.
Ii. Source code
% flat throw ball on the ground of the trajectory of the main program clear % clear variable vx=0.1; % rate ratio k=0.9; % rebound coefficient % flat throw ball on the ground bouncing trajectory function filefunction fun(vx,k)
if k>=1 returnEnd % if the rate ratio is greater than1It returns the tm = (1+k)/(1-k); % Movement time xm=2*vx*tm; % farthest figure % Create graph window plot([0,xm],[0.0].'LineWidth'.3Grid on % axis equal % axis([0,xm,0.1]) % range fs=16; % font size title('Trajectory of the ball bouncing across the ground.'.'FontSize', title xlabel (fs) %Horizontal distance \ ITx /h'.'FontSize',fs) % ylabel('Vertical height \ity/h'.'FontSize',fs) % TXT =['Rate ratio \ ITv_x /v\ RM_0 :',num2str(vx)]; % Ratio of horizontal rate to land rate Text TXT =[TXT, rebound coefficient:,num2str(k)]; % rebound coefficient text(0.0.5,txt,'FontSize',fs) % display speed ratio TXT =['\itT\rm=',num2str((1+k)/(1-k)),'(2\ith/g\rm)^{1/2}']; % Movement time string TXT =[TXT',\itX\rm=',num2str(xm),'\ith']; % connection distance text(xm/4.0.8,txt,'FontSize',fs) % displays exercise timeCopy the code
3. Operation results
Fourth, note
Version: 2014a complete code or write plus 1564658423