Monte-Carlo simulating blood types in Austria was easy in Scilab, but I do not
manage to show text labels along the x-axis. Text would be:
blood=['0+' 'A+' 'B+' 'AB+' '0-' 'A-' 'B-' 'AB-']
and the diagram should look similar to my attached EXCEL.
Heinz
// SciLab code for Monte-Carlo simulating blood types in Austria
p=[0.3 0.37 0.12 0.05 0.06 0.07 0.02 0.01];
blood=['0+' 'A+' 'B+' 'AB+' '0-' 'A-' 'B-' 'AB-']
P=cumsum(p);P=[0 P];np=length(p);nj=5;C = zeros(np,nj);
N=12; X = grand(nj,N,'def');
for i=1:np
C(i,:) = sum((X>=P(i) & X<P(i+1)),2)';
end
C_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users