No BSD License  

Highlights from
Alternative Mathematics using MATLAB 7

image thumbnail

Alternative Mathematics using MATLAB 7

by

 

13 Mar 2003 (Updated )

Self-instructive text on undergraduate algebra, statistics, differential and integral calculus.

ex185.m
% ex185.m:  Vertical Motion of a Ball, Simulated				
clear all,  randn('seed',sum(100*clock))
v0=12;					% SI units throughout ...
g=9.81;					% Acceleration due to gravity
T=0:0.02:2.5;				% Times as a row vector
Y=v0*T- 0.5*g*T.^2;			% Theoretical heights	
Err=0.3* randn(1,length(T));		% Row vector, the length of T
Y=Y+Err;					% Measured heights
figure(1),  plot(T,Err,'o'),  grid on,  title('Error against time')
figure(2),  plot(T,Y,'+'),  grid on,  title('Height against time')
balldata=[T' Y'];              				% Two columns (transposed rows)
save ball.m  balldata  -ascii;   		%  Save data table 

Contact us