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 jump track of the main program clear % clear variable vx=0.1; % rate ratio k=0.9; Function fun(vx,k) if k>=1 return,end % If rate ratio > 1 tm=(1+k)/(1-k); % Exercise time xm=2*vx*tm; Plot ([0,xm],[0,0],'LineWidth',3) % Draw the horizon grid on % plus axis equal % Axis ([0,xm,0,1]) % Coordinate range fs=16; % FontSize title(' trajectory of the ball bouncing on the ground ','FontSize',fs)% title xlabel(' horizontal distance \itx/h','FontSize',fs) % abscess label Ylabel (' vertical height \ ity/h ', 'FontSize, fs) % ordinate label TXT = [' rate than \ \ rm_0 itv_x/v:', num2str (ag)]; TXT =[TXT ', rebound coefficient :',num2str(k)]; Text text % rebound coefficient (0,0.5, TXT, 'FontSize, fs) % display rate than text TXT = [', itT, rm =', num2str ((1 + k)/(1 - k)), '(2 \ ith/g \ rm) ^ 1/2} {']. % time string TXT = [TXT ', \ itX \ rm = ', num2str (xm), '\ ith']. Text (xm/4,0.8, TXT,'FontSize',fs) % displays the movement timeCopy the code
3. Operation results
Fourth, note
The code download www.cnblogs.com/ttmatlab/p/…