No BSD License  

Highlights from
Alternative Mathematics using MATLAB 7

image thumbnail

Alternative Mathematics using MATLAB 7



13 Mar 2003 (Updated )

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

% ex174a.m:  Repeated Sequences of Tosses, Comparison   				
clear all,  rand('seed',sum(100*clock)),   ntest=1000;		% Number of tests
m0=10;						% Number of tosses per test
for i=1:ntest				
   Mh(i)=sum( ceil( rand(1,m0)-0.5));	% Number of heads counted
Xh=0:m0;						% Select container centers
figure(1),  hist(Mh,Xh),  grid on
   xlabel('number of heads'),  ylabel('number of results in container')
   for j=1:m0+1					% Vector index
   m=j-1;						% Range m=0m0
   Ybd(j)=ntest* prod(1:m0)/ prod(1:m)/ prod(1:(m0-m))*0.5^m0;
hold on						% Superimpose points (o)
figure(1),  plot(Xm,Ybd,'ro'),  grid on,  hold off

Contact us